示例#1
0
        /**
         * Convert DescribeJobFlowsRequest to name value pairs
         */
        private static IDictionary <string, string> ConvertDescribeJobFlows(DescribeJobFlowsRequest request)
        {
            IDictionary <string, string> parameters = new Dictionary <string, string>();

            parameters["Action"] = "DescribeJobFlows";
            if (request.IsSetCreatedAfter())
            {
                parameters["CreatedAfter"] = request.CreatedAfter;
            }
            if (request.IsSetCreatedBefore())
            {
                parameters["CreatedBefore"] = request.CreatedBefore;
            }
            List <string> describeJobFlowsRequestJobFlowIdsList      = request.JobFlowIds;
            int           describeJobFlowsRequestJobFlowIdsListIndex = 1;

            foreach (string describeJobFlowsRequestJobFlowIds in describeJobFlowsRequestJobFlowIdsList)
            {
                parameters[String.Concat("JobFlowIds", ".member.", describeJobFlowsRequestJobFlowIdsListIndex)] = describeJobFlowsRequestJobFlowIds;
                describeJobFlowsRequestJobFlowIdsListIndex++;
            }
            List <string> describeJobFlowsRequestJobFlowStatesList      = request.JobFlowStates;
            int           describeJobFlowsRequestJobFlowStatesListIndex = 1;

            foreach (string describeJobFlowsRequestJobFlowStates in describeJobFlowsRequestJobFlowStatesList)
            {
                parameters[String.Concat("JobFlowStates", ".member.", describeJobFlowsRequestJobFlowStatesListIndex)] = describeJobFlowsRequestJobFlowStates;
                describeJobFlowsRequestJobFlowStatesListIndex++;
            }

            return(parameters);
        }
        private static IDictionary <string, string> ConvertDescribeJobFlows(DescribeJobFlowsRequest request)
        {
            IDictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["Action"] = "DescribeJobFlows";
            if (request.IsSetCreatedAfter())
            {
                dictionary["CreatedAfter"] = request.CreatedAfter;
            }
            if (request.IsSetCreatedBefore())
            {
                dictionary["CreatedBefore"] = request.CreatedBefore;
            }
            List <string> jobFlowIds = request.JobFlowIds;
            int           num        = 1;

            foreach (string str in jobFlowIds)
            {
                dictionary["JobFlowIds" + ".member." + num] = str;
                num++;
            }
            List <string> jobFlowStates = request.JobFlowStates;
            int           num2          = 1;

            foreach (string str2 in jobFlowStates)
            {
                dictionary["JobFlowStates" + ".member." + num2] = str2;
                num2++;
            }
            return(dictionary);
        }