diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/ARN.cpp | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) | |
download | ydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/ARN.cpp')
-rw-r--r-- | contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/ARN.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/ARN.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/ARN.cpp index c4fce2ccac..dac358c09d 100644 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/ARN.cpp +++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/ARN.cpp @@ -1,46 +1,46 @@ -/** - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ - -#include <aws/core/utils/ARN.h> -#include <aws/core/utils/StringUtils.h> -#include <aws/core/utils/logging/LogMacros.h> - -namespace Aws -{ - namespace Utils - { - ARN::ARN(const Aws::String& arnString) - { - m_valid = false; - - // An ARN can be identified as any string starting with arn: with 6 defined segments each separated by a : - const auto result = StringUtils::Split(arnString, ':', StringUtils::SplitOptions::INCLUDE_EMPTY_ENTRIES); - - if (result.size() < 6) - { - return; - } - - if (result[0] != "arn") - { - return; - } - - m_arnString = arnString; - m_partition = result[1]; - m_service = result[2]; - m_region = result[3]; - m_accountId = result[4]; - m_resource = result[5]; - - for (size_t i = 6; i < result.size(); i++) - { - m_resource += ":" + result[i]; - } - - m_valid = true; - } - } -}
\ No newline at end of file +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include <aws/core/utils/ARN.h> +#include <aws/core/utils/StringUtils.h> +#include <aws/core/utils/logging/LogMacros.h> + +namespace Aws +{ + namespace Utils + { + ARN::ARN(const Aws::String& arnString) + { + m_valid = false; + + // An ARN can be identified as any string starting with arn: with 6 defined segments each separated by a : + const auto result = StringUtils::Split(arnString, ':', StringUtils::SplitOptions::INCLUDE_EMPTY_ENTRIES); + + if (result.size() < 6) + { + return; + } + + if (result[0] != "arn") + { + return; + } + + m_arnString = arnString; + m_partition = result[1]; + m_service = result[2]; + m_region = result[3]; + m_accountId = result[4]; + m_resource = result[5]; + + for (size_t i = 6; i < result.size(); i++) + { + m_resource += ":" + result[i]; + } + + m_valid = true; + } + } +}
\ No newline at end of file |