Build an operation definition.
199283
def build_operation(operation, ns, rule, func):
    
    swagger_operation = swagger.Operation(
        operationId=operation_name(operation, ns),
        parameters=swagger.ParametersList([
        ]),
        responses=swagger.Responses(),
        tags=[ns.subject_name],
    )

    # custom header parameter
    swagger_operation.parameters.append(
        header_param("X-Response-Skip-Null")
    )

    # path parameters
    swagger_operation.parameters.extend([
        path_param(argument, ns)
        for argument in rule.arguments
    ])

    # query string parameters
    qs_schema = get_qs_schema(func)
    if qs_schema:
        swagger_operation.parameters.extend([
            query_param(name, field)
            for name, field in qs_schema.fields.items()
        ])

    # body parameter
    request_schema = get_request_schema(func)
    if request_schema:
        swagger_operation.parameters.append(
            body_param(request_schema)
        )

    # sort parameters for predictable output
    swagger_operation.parameters.sort(key=lambda parameter: parameter["name"])

    add_responses(swagger_operation, operation, ns, func)
    return swagger_operation
431094
def build_object(self, obj):
        """"""
        try:
            super(TalkView, self).build_object(obj)
        except PermissionDenied:
            # We cleanup the directory created
            self.unbuild_object(obj)
691669
def build(self, construct):
        
        if lib.EnvBuild(self._env, construct.encode()) != 1:
            raise CLIPSError(self._env)
442364
def cmd_build(conf: Config, run_tests: bool=False):
    """"""
    build_context = BuildContext(conf)
    populate_targets_graph(build_context, conf)
    build_context.build_graph(run_tests=run_tests)
    build_context.write_artifacts_metadata()
809254
protected function build()
    {
        $operation = $this->buildOperation('ListPaymentMethods');

        $merchantID = $this->document->createElement('merchantID', $this->merchantId);
        $operation->appendChild($merchantID);

        if ($this->pType) {
            $pType = $this->document->createElement('pType', $this->pType);
            $operation->appendChild($pType);
        }
    }
687399
def build_single(mode):
    """"""
    if mode == 'force':
        amode = ['-a']
    else:
        amode = []
    if executable.endswith('uwsgi'):
        # hack, might fail in some environments!
        _executable = executable[:-5] + 'python'
    else:
        _executable = executable
    p = subprocess.Popen([_executable, '-m', 'nikola', 'build'] + amode,
                         stderr=subprocess.PIPE)
    p.wait()
    rl = p.stderr.readlines()
    try:
        out = ''.join(rl)
    except TypeError:
        out = ''.join(l.decode('utf-8') for l in rl)
    return (p.returncode == 0), out
60868
def process(self, obj, pk_set=None, action=None, update_fields=None, **kwargs):
        """"""
        build_kwargs = self._get_build_kwargs(obj, pk_set, action, update_fields, **kwargs)

        if build_kwargs:
            self.index.build(**build_kwargs)
368092
def build(self, *args, **kwargs):
        """"""
        # Create the directories of the work.
        self.indir.makedirs()
        self.outdir.makedirs()
        self.tmpdir.makedirs()

        # Build dirs and files of each task.
        for task in self:
            task.build(*args, **kwargs)

        # Connect signals within the work.
        self.connect_signals()
987492
def build(self, builder):
        """"""
        params = dict(
            OID=self.oid,
            Active=bool_to_true_false(self.active),
            BypassDuringMigration=bool_to_true_false(self.bypass_during_migration),
            NeedsRetesting=bool_to_true_false(self.needs_retesting),
        )

        if self.variable_oid is not None:
            params["VariableOID"] = self.variable_oid

        if self.field_oid is not None:
            params["FieldOID"] = self.field_oid

        if self.form_oid is not None:
            params["FormOID"] = self.form_oid

        if self.folder_oid is not None:
            params["FolderOID"] = self.folder_oid

        if self.record_position is not None:
            params["RecordPosition"] = str(self.record_position)

        if self.form_repeat_number is not None:
            params["FormRepeatNumber"] = str(self.form_repeat_number)

        if self.folder_repeat_number is not None:
            params["FolderRepeatNumber"] = str(self.folder_repeat_number)

        if self.all_variables_in_folders is not None:
            params["AllVariablesInFolders"] = bool_to_true_false(
                self.all_variables_in_folders
            )

        if self.all_variables_in_fields is not None:
            params["AllVariablesInFields"] = bool_to_true_false(
                self.all_variables_in_fields
            )

        if self.logical_record_position is not None:
            params["LogicalRecordPosition"] = self.logical_record_position.value

        builder.start("mdsol:DerivationDef", params)
        for step in self.derivation_steps:
            step.build(builder)
        builder.end("mdsol:DerivationDef")
1078563
def build(self):
        """"""
        for cmd in self.build_cmds:
            log.info('building command: {}'.format(cmd))
            full_cmd = 'cd {}; {}'.format(self.analyses_path, cmd)
            log.debug('full command: {}'.format(full_cmd))
            subprocess.call(full_cmd, shell=True)
            log.info('build done')
247678
def build(self, ignore=None):
        ''''''
        self._prepare_workspace()
        self.install_dependencies()
        self.package(ignore)
1117850
def call_operation(self, operation, **kwargs):
        
        data = {'operation': operation}
        data.update(kwargs)
        return self.invoke(data)
1318926
def build(self,
              tool: Tool,
              force: bool = False,
              quiet: bool = False
              ) -> None:
        
        self.__installation.build.build(tool.image,
                                        force=force,
                                        quiet=quiet)
394740
def build_result(data):
    """"""
    more = {}
    for key, value  in data.items():
        if key != 'elements':
            newnode = value
        else:
            newnode = {}
            for el in value:
                nkey, nvalue = process_node(el)
                newnode[nkey] = nvalue

        more[key] = newnode

    return more
63627
def define_operations
      @info.operations.each do |op| 
        self.class.__send__(:define_method, op.name) do |*params|
          jargs, jtypes = java_args(op.signature, params)
          @server.invoke @object_name, op.name, jargs, jtypes
        end
      end
    end
441488
def machine_op(self, operation):
        '''
        '''
        operations = {'feed2start': 1,
                      'feedone': 2,
                      'cut': 3
                      }
        
        if operation in operations:
            self.send('^'+'O'+'P'+chr(operations[operation]))
        else:
            raise RuntimeError('Invalid operation.')
195122
protected function build()
    {
        $operation = $this->buildOperation('AcceptPayment');

        $merchantID = $this->document->createElement('merchantID', $this->merchantId);
        $operation->appendChild($merchantID);

        $tid = $this->document->createElement('tid', $this->tid);
        $operation->appendChild($tid);

        $pType = $this->document->createElement('pType', $this->pType);
        $operation->appendChild($pType);


        $payment = $this->document->createElement('payment');
        $payment->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:type', 'etp:Payment' . $this->pType);
        $payment = $operation->appendChild($payment);

        $this->appendArray($payment, $this->payment);

        $this->appendArray($operation, $this->additional);
    }