/// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>  
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            GetBranchResponse response = new GetBranchResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;
            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("branch", targetDepth))
                {
                    var unmarshaller = BranchUnmarshaller.Instance;
                    response.Branch = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return response;
        }
        //= GetBranchInfo(codeCommit, repositoryName, refBranch);
        /// <summary>
        /// gets the commit information
        /// </summary>
        /// <param name="codeCommit"></param>
        /// <param name="repositoryName"></param>
        /// <param name="branchName"></param>
        /// <returns></returns>
        private GetBranchResponse GetBranchInfo(AmazonCodeCommitClient codeCommit, string repositoryName, string branchName)
        {
            GetBranchRequest branchRequest = new GetBranchRequest()
            {
                RepositoryName = repositoryName,
                BranchName     = branchName
            };
            GetBranchResponse returnValue = null;

            try
            {
                returnValue = codeCommit.GetBranchAsync(branchRequest).GetAwaiter().GetResult();
            }
            catch (BranchDoesNotExistException)
            {
                returnValue = null;
            }
            return(returnValue);
        }