The response object (with outputspeech, cards and session end)
 Should rename this, but Amazon picked their names.
 The only mandatory field is end_session which we default to true.
773444
def build_response_object(session_end = true)
      @response = Hash.new
      @response[:outputSpeech] = @speech unless @speech.nil?
      @response[:directives] = @directives unless @directives.empty?
      @response[:card] = @card unless @card.nil?
      @response[:reprompt] = @reprompt unless session_end && @reprompt.nil?
      @response[:shouldEndSession] = session_end
      @response
    end
479785
def set_name(self, new_name):
        

        yield from self._hypervisor.send('ethsw rename "{name}" "{new_name}"'.format(name=self._name, new_name=new_name))
        log.info('Ethernet switch "{name}" [{id}]: renamed to "{new_name}"'.format(name=self._name,
                                                                                   id=self._id,
                                                                                   new_name=new_name))
        self._name = new_name
337379
public boolean renameHttpSession(String oldName, String newName) {
		// Check new name validity
		if (newName == null || newName.isEmpty()) {
			log.warn("Trying to rename session from " + oldName + " illegal name: " + newName);
			return false;
		}

		// Check existing old name
		HttpSession session = getHttpSession(oldName);
		if (session == null) {
			return false;
		}

		// Check new name uniqueness
		if (getHttpSession(newName) != null) {
			log.warn("Trying to rename session from " + oldName + " to already existing: " + newName);
			return false;
		}

		// Rename the session and notify model
		session.setName(newName);
		this.model.fireHttpSessionUpdated(session);

		return true;
	}
195854
def rename(self, name):
        
        return self.client.api.rename(self.id, name)
428872
function rename(ts, cm) {
    var token = cm.getTokenAt(cm.getCursor());
    if (!/\w/.test(token.string)) showError(ts, cm, "Not at a variable");
    dialog(cm, "New name for " + token.string, function(newName) {
      ts.request(cm, {type: "rename", newName: newName, fullDocs: true}, function(error, data) {
        if (error) return showError(ts, cm, error);
        applyChanges(ts, data.changes);
      });
    });
  }
114752
def obsolete_rename(oldname, newfunc):
    
    newname = newfunc.__name__
    def __obsolete(*args, **kwargs):
        warnings.warn(
            "{oldname} is obsolete and is removed in PyQt5. "
            "Use {newname} instead.".format(oldname=oldname, newname=newname),
            DeprecationWarning,
            stacklevel=2
        )
        return newfunc(*args, **kwargs)
    __obsolete.__name__ = oldname
    return __obsolete
1327347
function askForTableName() {
    if (this.force) {
        return;
    }

    const validateTableName = dbh.validateTableName;
    const done = this.async();

    this.prompt([
        {
            type: 'input',
            name: 'dbhTableName',
            validate: ((input) => {
                const prodDatabaseType = this.jhipsterAppConfig.prodDatabaseType;
                return validateTableName(input, prodDatabaseType);
            }),
            message: 'What is the table name for this entity ?',
            default: this.entityTableName
        }
    ]).then((props) => {
        this.tableNameInput = props.dbhTableName;
        done();
    });
}
875097
def say_response(speech, end_session = true, ssml = false)
      output_speech = add_speech(speech,ssml)
      { :outputSpeech => output_speech, :shouldEndSession => end_session }
    end
1148964
def rename_to_tmp_name(self):
        
        self.client.rename(
            self.id,
            '%s_%s' % (self.short_id, self.name)
        )
1066599
def record_rename(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/rename' % object_id, input_params, always_retry=always_retry, **kwargs)
595084
protected final void endClientExecution(
            AWSRequestMetrics awsRequestMetrics, Request<?> request,
            Response<?> response) {
        this.endClientExecution(awsRequestMetrics, request, response,
                !LOGGING_AWS_REQUEST_METRIC);
    }
1082916
public void refreshNames() {
        Message namesMessage = new Message(MessageType.NAMES, this.channelName);
        List<Message> response;

        try {
            response = connection.request(
                MessageFilters.message(MessageType.RPL_NAMREPLY, null, "=", channelName),
                MessageFilters.message(MessageType.RPL_ENDOFNAMES, null, channelName),
                namesMessage);
        } catch (InterruptedException e) {
            return;
        }

        List<String> names = new ArrayList<String>();

        for (Message message : response) {
            if (message.getType() == MessageType.RPL_NAMREPLY) {
                String[] args = message.getArgs();

                for (String name : args[args.length - 1].split(" ")) {
                    names.add(name.replaceFirst("^[@+]", ""));
                }
            }
        }

        this.names = names;
    }
1075007
def set_transcript_name(self,name):
    
    self._options = self._options._replace(name = name)
244538
def rename(self, name):
        """"""

        r = self._h._http_resource(
            method='PUT',
            resource=('apps', self.name),
            data={'app[name]': name}
        )
        return r.ok
302859
def rename_experiment(self, new_name):
        '''
        '''
        logger.info('rename experiment "%s"', self.experiment_name)
        content = {'name': new_name}
        url = self._build_api_url(
            '/experiments/{experiment_id}'.format(
                experiment_id=self._experiment_id
            )
        )
        res = self._session.put(url, json=content)
        res.raise_for_status()
        self.experiment_name = new_name
74328
@SuppressWarnings("unchecked")
	private void mergeNamedList(ShardRequest sreq, NamedList<Object> mtasResponse, String key,
			Integer preferredPurpose) {
		// create new response for key
		NamedList<Object> mtasListResponse;
		Object o = mtasResponse.get(key);
		if (o instanceof NamedList) {
			mtasListResponse = (NamedList<Object>) o;
		} else {
			mtasListResponse = new SimpleOrderedMap<>();
			mtasResponse.removeAll(key);
			mtasResponse.add(key, mtasListResponse);
		}
		// collect responses for each shard
		HashMap<String, NamedList<Object>> mtasListShardResponses = new HashMap<>();
		for (ShardResponse response : sreq.responses) {
			// only continue if new shard or preferred purpose
			if (mtasListShardResponses.containsKey(response.getShard())
					&& ((preferredPurpose == null) || (sreq.purpose != preferredPurpose))) {
				break;
			}
			// update
			try {
				NamedList<Object> result = response.getSolrResponse().getResponse();
				NamedList<Object> data = (NamedList<Object>) result.findRecursive("mtas", key);
				if (data != null) {
					mtasListShardResponses.put(response.getShard(), MtasSolrResultUtil.decode(data));
				}
			} catch (ClassCastException e) {
				log.debug(e);
			}
		}
		try {
			for (NamedList<Object> mtasListShardResponse : mtasListShardResponses.values()) {
				mergeResponsesNamedList(mtasListResponse, mtasListShardResponse);
			}
		} catch (IOException e) {
			log.error(e);
		}
	}
385546
public void cleanup () {
        //==========================================================================//
        //================= Cancel/Terminate Your Spot Request =====================//
        //==========================================================================//
        try {
            // Cancel requests.
            System.out.println("Cancelling requests.");
            CancelSpotInstanceRequestsRequest cancelRequest = new CancelSpotInstanceRequestsRequest(spotInstanceRequestIds);
            ec2.cancelSpotInstanceRequests(cancelRequest);
        } catch (AmazonServiceException e) {
            // Write out any exceptions that may have occurred.
            System.out.println("Error cancelling instances");
            System.out.println("Caught Exception: " + e.getMessage());
            System.out.println("Reponse Status Code: " + e.getStatusCode());
            System.out.println("Error Code: " + e.getErrorCode());
            System.out.println("Request ID: " + e.getRequestId());
        }

        try {
            // Terminate instances.
            System.out.println("Terminate instances");
            TerminateInstancesRequest terminateRequest = new TerminateInstancesRequest(instanceIds);
            ec2.terminateInstances(terminateRequest);
        } catch (AmazonServiceException e) {
            // Write out any exceptions that may have occurred.
            System.out.println("Error terminating instances");
            System.out.println("Caught Exception: " + e.getMessage());
            System.out.println("Reponse Status Code: " + e.getStatusCode());
            System.out.println("Error Code: " + e.getErrorCode());
            System.out.println("Request ID: " + e.getRequestId());
        }

        // Delete all requests and instances that we have terminated.
        instanceIds.clear();
        spotInstanceRequestIds.clear();
    }