Replaces Financial Advisor's settings.

        Args:
            faDataType: See :meth:`.requestFA`.
            xml: The XML-formatted configuration string.
509884
def replaceFA(self, faDataType: int, xml: str):
        
        self.client.replaceFA(faDataType, xml)
572878
public void modifySamlConfiguration(final Map<String, Object> changedValues) {
        ResourceAddress address = SAML_TEMPLATE.resolve(statementContext, federation);
        modifySingleton("SAML configuration", address, changedValues);
    }
1334072
def replace(self, scaling_group, name, cooldown, min_entities,
            max_entities, metadata=None):
        
        body = self._create_group_config_body(name, cooldown, min_entities,
                max_entities, metadata=metadata)
        group_id = utils.get_id(scaling_group)
        uri = "/%s/%s/config" % (self.uri_base, group_id)
        resp, resp_body = self.api.method_put(uri, body=body)
356944
def change_attributes(self, **kwargs):
        '''
        
        '''
        new_track = Track(self.viewconf['type'])
        new_track.position = self.position
        new_track.tileset = self.tileset
        new_track.viewconf = json.loads(json.dumps(self.viewconf))
        new_track.viewconf = {**new_track.viewconf, **kwargs}

        return new_track
610587
private void changeIdNameOrSchema(CmsModule module) throws CmsConfigurationException {

        //Remove m_type from current module (= delete type)
        List<CmsExplorerTypeSettings> typeSettings = Lists.newArrayList(module.getExplorerTypes());
        List<CmsExplorerTypeSettings> newTypeSettings = new ArrayList<CmsExplorerTypeSettings>();
        for (CmsExplorerTypeSettings setting : typeSettings) {
            if (!setting.getName().equals(m_type.getTypeName())) {
                newTypeSettings.add(setting);
            }
        }
        OpenCms.getWorkplaceManager().removeExplorerTypeSettings(module);

        List<I_CmsResourceType> types = new ArrayList<I_CmsResourceType>(module.getResourceTypes());

        types.remove(m_type);

        //Create new type
        CmsResourceTypeXmlContent type = new CmsResourceTypeXmlContent();
        type.addConfigurationParameter(CmsResourceTypeXmlContent.CONFIGURATION_SCHEMA, m_schema.getValue());
        type.setAdditionalModuleResourceType(true);
        type.setModuleName(module.getName());
        type.initConfiguration(
            m_typeShortName.getValue(),
            m_typeID.getValue(),
            CmsResourceTypeXmlContent.class.getName());
        types.add(type);

        module.setResourceTypes(types);

        // create the matching explorer type
        CmsExplorerTypeSettings setting = new CmsExplorerTypeSettings();
        setting.setTypeAttributes(
            m_typeShortName.getValue(),
            m_typeName.getValue(), //ToDo nicename
            null,
            null,
            CmsNewResourceTypeDialog.ICON_SMALL_DEFAULT,
            CmsNewResourceTypeDialog.ICON_BIG_DEFAULT,
            "xmlcontent",
            null,
            "false",
            null,
            null);
        setting.setAutoSetNavigation("false");
        setting.setAutoSetTitle("false");
        setting.setNewResourceOrder("10");
        setting.setAddititionalModuleExplorerType(true);

        setting.setBigIcon(
            ICON_MODE_CSS.equals(m_iconMode.getValue())
            ? null
            : CmsStringUtil.isEmptyOrWhitespaceOnly(m_bigIconFile.getValue()) ? null : m_bigIconFile.getValue());
        setting.setIcon(
            ICON_MODE_CSS.equals(m_iconMode.getValue())
            ? null
            : CmsStringUtil.isEmptyOrWhitespaceOnly(m_smallIconFile.getValue()) ? null : m_smallIconFile.getValue());
        setting.setBigIconStyle(
            ICON_MODE_CSS.equals(m_iconMode.getValue())
            ? CmsStringUtil.isEmptyOrWhitespaceOnly(m_bigIconCSS.getValue()) ? null : m_bigIconCSS.getValue()
            : null);
        setting.setSmallIconStyle(
            ICON_MODE_CSS.equals(m_iconMode.getValue())
            ? CmsStringUtil.isEmptyOrWhitespaceOnly(m_smallIconCSS.getValue()) ? null : m_smallIconCSS.getValue()
            : null);
        setting.setKey(m_typeName.getValue());
        setting.setTitleKey(m_typeTitle.getValue());
        setting.setInfo(m_typeDescription.getValue());

        newTypeSettings.add(setting);
        module.setExplorerTypes(newTypeSettings);

        OpenCms.getWorkplaceManager().addExplorerTypeSettings(module);

    }
872807
def alter(self, operation, timeout=None, metadata=None, credentials=None):
        """"""
        new_metadata = self.add_login_metadata(metadata)

        try:
            return self.any_client().alter(operation, timeout=timeout,
                                           metadata=new_metadata,
                                           credentials=credentials)
        except Exception as error:
            if util.is_jwt_expired(error):
                self.retry_login()
                new_metadata = self.add_login_metadata(metadata)
                return self.any_client().alter(operation, timeout=timeout,
                                               metadata=new_metadata,
                                               credentials=credentials)
            else:
                raise error
156241
public static base_response update(nitro_service client, appfwsettings resource) throws Exception {
		appfwsettings updateresource = new appfwsettings();
		updateresource.defaultprofile = resource.defaultprofile;
		updateresource.undefaction = resource.undefaction;
		updateresource.sessiontimeout = resource.sessiontimeout;
		updateresource.learnratelimit = resource.learnratelimit;
		updateresource.sessionlifetime = resource.sessionlifetime;
		updateresource.sessioncookiename = resource.sessioncookiename;
		updateresource.clientiploggingheader = resource.clientiploggingheader;
		updateresource.importsizelimit = resource.importsizelimit;
		updateresource.signatureautoupdate = resource.signatureautoupdate;
		updateresource.signatureurl = resource.signatureurl;
		updateresource.cookiepostencryptprefix = resource.cookiepostencryptprefix;
		updateresource.logmalformedreq = resource.logmalformedreq;
		updateresource.ceflogging = resource.ceflogging;
		updateresource.entitydecoding = resource.entitydecoding;
		updateresource.useconfigurablesecretkey = resource.useconfigurablesecretkey;
		return updateresource.update_resource(client);
	}
1191968
def change_type(self, func):
        """"""
        model = self.model()
        index_list = self.selectedIndexes()
        [model.setData(i, '', change_type=func) for i in index_list]
794923
def update_file(finfo, sample_info, config, pass_uptodate=False):
    
    storage_dir = utils.safe_makedir(_get_storage_dir(finfo, config))
    if finfo.get("type") == "directory":
        return _copy_finfo_directory(finfo, storage_dir)
    else:
        return _copy_finfo(finfo, storage_dir, pass_uptodate=pass_uptodate)
668499
def fieldAddChoices( dbid, fid, choice )

      @dbid, @fid, @choice = dbid, fid, choice

      xmlRequestData = toXML( :fid, @fid )

      if @choice.is_a?( Array )
         @choice.each { |c| xmlRequestData << toXML( :choice, c ) }
      elsif @choice.is_a?( String )
         xmlRequestData << toXML( :choice, @choice )
      end

      sendRequest( :fieldAddChoices, xmlRequestData )

      @fid = getResponseValue( :fid )
      @fname = getResponseValue( :fname )
      @numadded = getResponseValue( :numadded )

      return self if @chainAPIcalls
      return @fid, @name, @numadded
   end
795369
def fix_config(self, options):
        
        opt = "incremental"
        if opt not in options:
            options[opt] = False
        if opt not in self.help:
            self.help[opt] = "Whether to load the dataset incrementally (bool)."

        opt = "use_custom_loader"
        if opt not in options:
            options[opt] = False
        if opt not in self.help:
            self.help[opt] = "Whether to use a custom loader."

        opt = "custom_loader"
        if opt not in options:
            options[opt] = converters.Loader(classname="weka.core.converters.ArffLoader")
        if opt not in self.help:
            self.help[opt] = "The custom loader to use (Loader)."

        return super(LoadDataset, self).fix_config(options)
26975
def do_mfa(self, args):
        
        
        parser = CommandArgumentParser("mfa")
        parser.add_argument(dest='token',help='MFA token value');
        parser.add_argument("-p","--profile",dest='awsProfile',default=AwsConnectionFactory.instance.getProfile(),help='MFA token value');
        args = vars(parser.parse_args(args))

        token = args['token']
        awsProfile = args['awsProfile']
        arn = AwsConnectionFactory.instance.load_arn(awsProfile)

        credentials_command = ["aws","--profile",awsProfile,"--output","json","sts","get-session-token","--serial-number",arn,"--token-code",token]
        output = run_cmd(credentials_command) # Throws on non-zero exit :yey:

        credentials = json.loads("\n".join(output.stdout))['Credentials']
        AwsConnectionFactory.instance.setMfaCredentials(credentials,awsProfile)
16244
async def ChangeModelCredential(self, model_credentials):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='ModelManager',
                   request='ChangeModelCredential',
                   version=5,
                   params=_params)
        _params['model-credentials'] = model_credentials
        reply = await self.rpc(msg)
        return reply
248794
def set(aadb, cur):
    
    cfg = Config()
    edited = False

    if aadb:
        cfg.set(ConfigKeys.asset_allocation_database_path, aadb)
        print(f"The database has been set to {aadb}.")
        edited = True
    
    if cur:
        cfg.set(ConfigKeys.default_currency, cur)
        edited = True

    if edited:
        print(f"Changes saved.")
    else:
        print(f"No changes were made.")
        print(f"Use --help parameter for more information.")
1214746
private void addJolokiaId(Map<String, String> pFinalCfg) {
        if (!pFinalCfg.containsKey(ConfigKey.AGENT_ID.getKeyValue())) {
            pFinalCfg.put(ConfigKey.AGENT_ID.getKeyValue(), NetworkUtil.getAgentId(hashCode(),"jvm"));
        }
        pFinalCfg.put(ConfigKey.AGENT_TYPE.getKeyValue(), "jvm");
    }
874064
def _update_nrfa_metadata(remote_config):
    
    config['nrfa']['oh_json_url'] = remote_config['nrfa_oh_json_url']
    config['nrfa']['version'] = remote_config['nrfa_version']
    config['nrfa']['url'] = remote_config['nrfa_url']
    config.set_datetime('nrfa', 'published_on', datetime.utcfromtimestamp(remote_config['nrfa_published_on']))
    config.set_datetime('nrfa', 'downloaded_on', datetime.utcnow())
    config.set_datetime('nrfa', 'update_checked_on', datetime.utcnow())
    config.save()
1309832
def to_naf(self):
        
        if self.type == 'KAF':
            for node in self.__get_opinion_nodes():
                node.set('id',node.get('oid'))
                del node.attrib['oid']