@Override protected AbstractCanaryAccount buildAccount(Canary canary, String accountName) { GoogleCanaryAccount account = (GoogleCanaryAccount)new GoogleCanaryAccount().setName(accountName); account.setProject(project).setJsonPath(jsonPath); account.setBucket(bucket).setBucketLocation(bucketLocation); account.setRootFolder(isSet(rootFolder) ? rootFolder : account.getRootFolder()); GoogleCanaryServiceIntegration googleCanaryServiceIntegration = (GoogleCanaryServiceIntegration)CanaryUtils.getServiceIntegrationByClass(canary, GoogleCanaryServiceIntegration.class); if (googleCanaryServiceIntegration.isStackdriverEnabled()) { account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.METRICS_STORE); } if (googleCanaryServiceIntegration.isGcsEnabled()) { account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.CONFIGURATION_STORE); account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.OBJECT_STORE); } return account; }
@Override protected AbstractCanaryAccount buildAccount(Canary canary, String accountName) { GoogleCanaryAccount account = (GoogleCanaryAccount)new GoogleCanaryAccount().setName(accountName); account.setProject(project).setJsonPath(jsonPath); account.setBucket(bucket).setBucketLocation(bucketLocation); account.setRootFolder(isSet(rootFolder) ? rootFolder : account.getRootFolder()); GoogleCanaryServiceIntegration googleCanaryServiceIntegration = (GoogleCanaryServiceIntegration)CanaryUtils.getServiceIntegrationByClass(canary, GoogleCanaryServiceIntegration.class); if (googleCanaryServiceIntegration.isStackdriverEnabled()) { account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.METRICS_STORE); } if (googleCanaryServiceIntegration.isGcsEnabled()) { account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.CONFIGURATION_STORE); account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.OBJECT_STORE); } return account; }
canaryAccount.getBucket(), canaryAccount.getBucketLocation(), canaryAccount.getRootFolder(), canaryAccount.getProject(), jsonPath != null ? jsonPath : "",
@Override protected AbstractCanaryAccount editAccount(GoogleCanaryAccount account) { account.setProject(isSet(project) ? project : account.getProject()); account.setJsonPath(isSet(jsonPath) ? jsonPath : account.getJsonPath()); account.setBucket(isSet(bucket) ? bucket : account.getBucket()); account.setRootFolder(isSet(rootFolder) ? rootFolder : account.getRootFolder()); account.setBucketLocation(isSet(bucketLocation) ? bucketLocation : account.getBucketLocation()); return account; } }
@Override protected AbstractCanaryAccount editAccount(GoogleCanaryAccount account) { account.setProject(isSet(project) ? project : account.getProject()); account.setJsonPath(isSet(jsonPath) ? jsonPath : account.getJsonPath()); account.setBucket(isSet(bucket) ? bucket : account.getBucket()); account.setRootFolder(isSet(rootFolder) ? rootFolder : account.getRootFolder()); account.setBucketLocation(isSet(bucketLocation) ? bucketLocation : account.getBucketLocation()); return account; } }