List of usage examples for com.amazonaws.util StringUtils fromString
public static String fromString(String value)
From source file:com.github.sjones4.youcan.youare.model.transform.CreateAccountRequestMarshaller.java
License:Open Source License
public Request<CreateAccountRequest> marshall(CreateAccountRequest createAccountRequest) { if (createAccountRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); }//w w w . j av a 2 s . c om Request<CreateAccountRequest> request = new DefaultRequest<>(createAccountRequest, "AmazonIdentityManagement"); request.addParameter("Action", "CreateAccount"); request.addParameter("Version", "2010-05-08"); if (createAccountRequest.getAccountName() != null) { request.addParameter("AccountName", StringUtils.fromString(createAccountRequest.getAccountName())); } return request; }
From source file:com.github.sjones4.youcan.youare.model.transform.DeleteAccountPolicyRequestMarshaller.java
License:Open Source License
public Request<DeleteAccountPolicyRequest> marshall(DeleteAccountPolicyRequest deleteAccountPolicyRequest) { if (deleteAccountPolicyRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); }/*from ww w . jav a 2 s .co m*/ Request<DeleteAccountPolicyRequest> request = new DefaultRequest<>(deleteAccountPolicyRequest, "AmazonIdentityManagement"); request.addParameter("Action", "DeleteAccountPolicy"); request.addParameter("Version", "2010-05-08"); if (deleteAccountPolicyRequest.getAccountName() != null) { request.addParameter("AccountName", StringUtils.fromString(deleteAccountPolicyRequest.getAccountName())); } if (deleteAccountPolicyRequest.getPolicyName() != null) { request.addParameter("PolicyName", StringUtils.fromString(deleteAccountPolicyRequest.getPolicyName())); } return request; }
From source file:com.github.sjones4.youcan.youare.model.transform.DeleteAccountRequestMarshaller.java
License:Open Source License
public Request<DeleteAccountRequest> marshall(DeleteAccountRequest deleteAccountRequest) { if (deleteAccountRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); }/*from ww w. j a va2 s. co m*/ Request<DeleteAccountRequest> request = new DefaultRequest<>(deleteAccountRequest, "AmazonIdentityManagement"); request.addParameter("Action", "DeleteAccount"); request.addParameter("Version", "2010-05-08"); if (deleteAccountRequest.getAccountName() != null) { request.addParameter("AccountName", StringUtils.fromString(deleteAccountRequest.getAccountName())); } if (deleteAccountRequest.getRecursive() != null) { request.addParameter("Recursive", StringUtils.fromBoolean(deleteAccountRequest.getRecursive())); } return request; }
From source file:com.github.sjones4.youcan.youare.model.transform.GetAccountPolicyRequestMarshaller.java
License:Open Source License
public Request<GetAccountPolicyRequest> marshall(GetAccountPolicyRequest getAccountPolicyRequest) { if (getAccountPolicyRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); }/*w ww . j a va 2s. co m*/ Request<GetAccountPolicyRequest> request = new DefaultRequest<>(getAccountPolicyRequest, "AmazonIdentityManagement"); request.addParameter("Action", "GetAccountPolicy"); request.addParameter("Version", "2010-05-08"); if (getAccountPolicyRequest.getAccountName() != null) { request.addParameter("AccountName", StringUtils.fromString(getAccountPolicyRequest.getAccountName())); } if (getAccountPolicyRequest.getPolicyName() != null) { request.addParameter("PolicyName", StringUtils.fromString(getAccountPolicyRequest.getPolicyName())); } return request; }
From source file:com.github.sjones4.youcan.youare.model.transform.ListAccountPoliciesRequestMarshaller.java
License:Open Source License
public Request<ListAccountPoliciesRequest> marshall(ListAccountPoliciesRequest listAccountPoliciesRequest) { if (listAccountPoliciesRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); }/*w w w . j av a 2 s . c o m*/ Request<ListAccountPoliciesRequest> request = new DefaultRequest<>(listAccountPoliciesRequest, "AmazonIdentityManagement"); request.addParameter("Action", "ListAccountPolicies"); request.addParameter("Version", "2010-05-08"); if (listAccountPoliciesRequest.getAccountName() != null) { request.addParameter("AccountName", StringUtils.fromString(listAccountPoliciesRequest.getAccountName())); } return request; }
From source file:com.github.sjones4.youcan.youare.model.transform.PutAccountPolicyRequestMarshaller.java
License:Open Source License
public Request<PutAccountPolicyRequest> marshall(PutAccountPolicyRequest putAccountPolicyRequest) { if (putAccountPolicyRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); }/* ww w .j a v a 2 s .c o m*/ Request<PutAccountPolicyRequest> request = new DefaultRequest<>(putAccountPolicyRequest, "AmazonIdentityManagement"); request.addParameter("Action", "PutAccountPolicy"); request.addParameter("Version", "2010-05-08"); if (putAccountPolicyRequest.getAccountName() != null) { request.addParameter("AccountName", StringUtils.fromString(putAccountPolicyRequest.getAccountName())); } if (putAccountPolicyRequest.getPolicyName() != null) { request.addParameter("PolicyName", StringUtils.fromString(putAccountPolicyRequest.getPolicyName())); } if (putAccountPolicyRequest.getPolicyDocument() != null) { request.addParameter("PolicyDocument", StringUtils.fromString(putAccountPolicyRequest.getPolicyDocument())); } return request; }
From source file:com.github.sjones4.youcan.youprop.model.transform.DescribePropertiesRequestMarshaller.java
License:Open Source License
public Request<DescribePropertiesRequest> marshall(DescribePropertiesRequest describePropertiesRequest) { if (describePropertiesRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); }/*from w w w . j a va 2 s . co m*/ final Request<DescribePropertiesRequest> request = new DefaultRequest<>(describePropertiesRequest, "EucalyptusProperties"); request.addParameter("Action", "DescribeProperties"); request.addParameter("Version", "eucalyptus"); final List<String> propertiesList = describePropertiesRequest.getProperties(); int propertiesListIndex = 1; for (final String propertiesListValue : propertiesList) { if (propertiesListValue != null) { request.addParameter("Property." + propertiesListIndex, StringUtils.fromString(propertiesListValue)); } propertiesListIndex++; } return request; }
From source file:com.github.sjones4.youcan.youprop.model.transform.ModifyPropertyValueRequestMarshaller.java
License:Open Source License
public Request<ModifyPropertyValueRequest> marshall(ModifyPropertyValueRequest modifyPropertyValueRequest) { if (modifyPropertyValueRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); }//from w w w.jav a2 s . co m final Request<ModifyPropertyValueRequest> request = new DefaultRequest<>(modifyPropertyValueRequest, "EucalyptusProperties"); request.addParameter("Action", "ModifyPropertyValue"); request.addParameter("Version", "eucalyptus"); if (modifyPropertyValueRequest.getName() != null) { request.addParameter("Name", StringUtils.fromString(modifyPropertyValueRequest.getName())); } if (modifyPropertyValueRequest.getValue() != null) { request.addParameter("Value", StringUtils.fromString(modifyPropertyValueRequest.getValue())); } return request; }
From source file:com.github.sjones4.youcan.youserv.model.transform.DescribeServiceCertificatesRequestMarshaller.java
License:Open Source License
public Request<DescribeServiceCertificatesRequest> marshall( DescribeServiceCertificatesRequest describeServiceCertificatesRequest) { if (describeServiceCertificatesRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); }/*from www .j a va2 s . co m*/ final Request<DescribeServiceCertificatesRequest> request = new DefaultRequest<>( describeServiceCertificatesRequest, "EucalyptusServices"); request.addParameter("Action", "DescribeServiceCertificates"); request.addParameter("Version", "eucalyptus"); if (describeServiceCertificatesRequest.getFormat() != null) { request.addParameter("Format", describeServiceCertificatesRequest.getFormat()); } if (describeServiceCertificatesRequest.getFingerprintDigest() != null) { request.addParameter("FingerprintDigest", describeServiceCertificatesRequest.getFingerprintDigest()); } final List<Filter> filtersList = describeServiceCertificatesRequest.getFilters(); int filtersListIndex = 1; for (final Filter filtersListValue : filtersList) { Filter filterMember = filtersListValue; if (filterMember != null) { if (filterMember.getName() != null) { request.addParameter("Filter." + filtersListIndex + ".Name", StringUtils.fromString(filterMember.getName())); } if (filterMember.getValues() != null) { final List<String> valuesList = filterMember.getValues(); int valuesListIndex = 1; for (final String valuesListValue : valuesList) { if (valuesListValue != null) { request.addParameter("Filter." + filtersListIndex + ".Value." + valuesListIndex, StringUtils.fromString(valuesListValue)); } valuesListIndex++; } } } filtersListIndex++; } return request; }
From source file:com.github.sjones4.youcan.youserv.model.transform.DescribeServicesRequestMarshaller.java
License:Open Source License
public Request<DescribeServicesRequest> marshall(DescribeServicesRequest describeServicesRequest) { if (describeServicesRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); }/* ww w. j av a 2s .c o m*/ final Request<DescribeServicesRequest> request = new DefaultRequest<>(describeServicesRequest, "EucalyptusServices"); request.addParameter("Action", "DescribeServices"); request.addParameter("Version", "eucalyptus"); final List<String> servicesList = describeServicesRequest.getServiceNames(); int servicesListIndex = 1; for (final String servicesListValue : servicesList) { if (servicesListValue != null) { request.addParameter("ServiceName." + servicesListIndex, StringUtils.fromString(servicesListValue)); } servicesListIndex++; } final List<Filter> filtersList = describeServicesRequest.getFilters(); int filtersListIndex = 1; for (final Filter filtersListValue : filtersList) { Filter filterMember = filtersListValue; if (filterMember != null) { if (filterMember.getName() != null) { request.addParameter("Filter." + filtersListIndex + ".Name", StringUtils.fromString(filterMember.getName())); } if (filterMember.getValues() != null) { final List<String> valuesList = filterMember.getValues(); int valuesListIndex = 1; for (final String valuesListValue : valuesList) { if (valuesListValue != null) { request.addParameter("Filter." + filtersListIndex + ".Value." + valuesListIndex, StringUtils.fromString(valuesListValue)); } valuesListIndex++; } } } filtersListIndex++; } return request; }