1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/codecommit/CodeCommit_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSVector.h> 9 #include <aws/codecommit/model/Commit.h> 10 #include <aws/codecommit/model/BatchGetCommitsError.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 template<typename RESULT_TYPE> 16 class AmazonWebServiceResult; 17 18 namespace Utils 19 { 20 namespace Json 21 { 22 class JsonValue; 23 } // namespace Json 24 } // namespace Utils 25 namespace CodeCommit 26 { 27 namespace Model 28 { 29 class AWS_CODECOMMIT_API BatchGetCommitsResult 30 { 31 public: 32 BatchGetCommitsResult(); 33 BatchGetCommitsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); 34 BatchGetCommitsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); 35 36 37 /** 38 * <p>An array of commit data type objects, each of which contains information 39 * about a specified commit.</p> 40 */ GetCommits()41 inline const Aws::Vector<Commit>& GetCommits() const{ return m_commits; } 42 43 /** 44 * <p>An array of commit data type objects, each of which contains information 45 * about a specified commit.</p> 46 */ SetCommits(const Aws::Vector<Commit> & value)47 inline void SetCommits(const Aws::Vector<Commit>& value) { m_commits = value; } 48 49 /** 50 * <p>An array of commit data type objects, each of which contains information 51 * about a specified commit.</p> 52 */ SetCommits(Aws::Vector<Commit> && value)53 inline void SetCommits(Aws::Vector<Commit>&& value) { m_commits = std::move(value); } 54 55 /** 56 * <p>An array of commit data type objects, each of which contains information 57 * about a specified commit.</p> 58 */ WithCommits(const Aws::Vector<Commit> & value)59 inline BatchGetCommitsResult& WithCommits(const Aws::Vector<Commit>& value) { SetCommits(value); return *this;} 60 61 /** 62 * <p>An array of commit data type objects, each of which contains information 63 * about a specified commit.</p> 64 */ WithCommits(Aws::Vector<Commit> && value)65 inline BatchGetCommitsResult& WithCommits(Aws::Vector<Commit>&& value) { SetCommits(std::move(value)); return *this;} 66 67 /** 68 * <p>An array of commit data type objects, each of which contains information 69 * about a specified commit.</p> 70 */ AddCommits(const Commit & value)71 inline BatchGetCommitsResult& AddCommits(const Commit& value) { m_commits.push_back(value); return *this; } 72 73 /** 74 * <p>An array of commit data type objects, each of which contains information 75 * about a specified commit.</p> 76 */ AddCommits(Commit && value)77 inline BatchGetCommitsResult& AddCommits(Commit&& value) { m_commits.push_back(std::move(value)); return *this; } 78 79 80 /** 81 * <p>Returns any commit IDs for which information could not be found. For example, 82 * if one of the commit IDs was a shortened SHA ID or that commit was not found in 83 * the specified repository, the ID returns an error object with more 84 * information.</p> 85 */ GetErrors()86 inline const Aws::Vector<BatchGetCommitsError>& GetErrors() const{ return m_errors; } 87 88 /** 89 * <p>Returns any commit IDs for which information could not be found. For example, 90 * if one of the commit IDs was a shortened SHA ID or that commit was not found in 91 * the specified repository, the ID returns an error object with more 92 * information.</p> 93 */ SetErrors(const Aws::Vector<BatchGetCommitsError> & value)94 inline void SetErrors(const Aws::Vector<BatchGetCommitsError>& value) { m_errors = value; } 95 96 /** 97 * <p>Returns any commit IDs for which information could not be found. For example, 98 * if one of the commit IDs was a shortened SHA ID or that commit was not found in 99 * the specified repository, the ID returns an error object with more 100 * information.</p> 101 */ SetErrors(Aws::Vector<BatchGetCommitsError> && value)102 inline void SetErrors(Aws::Vector<BatchGetCommitsError>&& value) { m_errors = std::move(value); } 103 104 /** 105 * <p>Returns any commit IDs for which information could not be found. For example, 106 * if one of the commit IDs was a shortened SHA ID or that commit was not found in 107 * the specified repository, the ID returns an error object with more 108 * information.</p> 109 */ WithErrors(const Aws::Vector<BatchGetCommitsError> & value)110 inline BatchGetCommitsResult& WithErrors(const Aws::Vector<BatchGetCommitsError>& value) { SetErrors(value); return *this;} 111 112 /** 113 * <p>Returns any commit IDs for which information could not be found. For example, 114 * if one of the commit IDs was a shortened SHA ID or that commit was not found in 115 * the specified repository, the ID returns an error object with more 116 * information.</p> 117 */ WithErrors(Aws::Vector<BatchGetCommitsError> && value)118 inline BatchGetCommitsResult& WithErrors(Aws::Vector<BatchGetCommitsError>&& value) { SetErrors(std::move(value)); return *this;} 119 120 /** 121 * <p>Returns any commit IDs for which information could not be found. For example, 122 * if one of the commit IDs was a shortened SHA ID or that commit was not found in 123 * the specified repository, the ID returns an error object with more 124 * information.</p> 125 */ AddErrors(const BatchGetCommitsError & value)126 inline BatchGetCommitsResult& AddErrors(const BatchGetCommitsError& value) { m_errors.push_back(value); return *this; } 127 128 /** 129 * <p>Returns any commit IDs for which information could not be found. For example, 130 * if one of the commit IDs was a shortened SHA ID or that commit was not found in 131 * the specified repository, the ID returns an error object with more 132 * information.</p> 133 */ AddErrors(BatchGetCommitsError && value)134 inline BatchGetCommitsResult& AddErrors(BatchGetCommitsError&& value) { m_errors.push_back(std::move(value)); return *this; } 135 136 private: 137 138 Aws::Vector<Commit> m_commits; 139 140 Aws::Vector<BatchGetCommitsError> m_errors; 141 }; 142 143 } // namespace Model 144 } // namespace CodeCommit 145 } // namespace Aws 146