setAwsAccounts()

in addons/addon-base-raas-ui/packages/base-raas-ui/src/models/aws-accounts/AwsAccount.js [96:126]


    setAwsAccounts(rawAwsAccounts) {
      self.id = rawAwsAccounts.id;
      self.rev = rawAwsAccounts.rev || self.rev || 0;
      self.name = rawAwsAccounts.name || self.name || '';
      self.description = rawAwsAccounts.description || self.description;
      self.accountId = rawAwsAccounts.accountId || rawAwsAccounts.accountId;
      self.externalId = rawAwsAccounts.externalId || self.externalId;
      self.permissionStatus = rawAwsAccounts.permissionStatus || self.permissionStatus || 'UNKNOWN';
      self.cfnStackName = rawAwsAccounts.cfnStackName || self.cfnStackName;
      self.cfnStackId = rawAwsAccounts.cfnStackId || self.cfnStackId;
      self.roleArn = rawAwsAccounts.roleArn || self.roleArn;
      self.vpcId = rawAwsAccounts.vpcId || self.vpcId;
      self.subnetId = rawAwsAccounts.subnetId || self.subnetId;
      self.encryptionKeyArn = rawAwsAccounts.encryptionKeyArn || self.encryptionKeyArn;
      self.onboardStatusRoleArn = rawAwsAccounts.onboardStatusRoleArn || self.onboardStatusRoleArn;
      self.createdAt = rawAwsAccounts.createdAt || self.createdAt;
      self.updatedAt = rawAwsAccounts.updatedAt || self.updatedAt;
      self.createdBy = rawAwsAccounts.createdBy || self.createdBy;
      self.updatedBy = rawAwsAccounts.updatedBy || self.updatedBy;
      self.appStreamStackName = rawAwsAccounts.appStreamStackName;
      self.appStreamFleetName = rawAwsAccounts.appStreamFleetName;
      self.appStreamSecurityGroupId = rawAwsAccounts.appStreamSecurityGroupId;
      self.isAppStreamConfigured =
        !_.isUndefined(rawAwsAccounts.appStreamStackName) &&
        !_.isUndefined(rawAwsAccounts.appStreamFleetName) &&
        !_.isUndefined(rawAwsAccounts.appStreamSecurityGroupId);
      self.rev = rawAwsAccounts.rev || 0;

      // Can't use || for needsPermissionUpdate because the value is a Boolean
      // we don't update the other fields because they are being populated by a separate store
    },