/** * <p> * Describes the application. * </p> * * @param description * Describes the application. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateApplicationRequest withDescription(String description) { setDescription(description); return this; }
/** * Constructs a new CreateApplicationRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param applicationName * The name of the application.</p> * <p> * Constraint: This name must be unique within your account. If the specified name already exists, the action * returns an <code>InvalidParameterValue</code> error. */ public CreateApplicationRequest(String applicationName) { setApplicationName(applicationName); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getApplicationName() == null) ? 0 : getApplicationName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getResourceLifecycleConfig() == null) ? 0 : getResourceLifecycleConfig().hashCode()); return hashCode; }
public void createApplication(String name) { CreateApplicationRequest cr = new CreateApplicationRequest(); cr.setApplicationName(name); cr.setDescription("Generated by CloudML"); CreateApplicationResult res = beanstalkClient.createApplication(cr); journal.log(Level.INFO, ">> Status of the application creation: " + res.toString()); }
protected Object executeInternal() throws MojoExecutionException { CreateApplicationRequest request = new CreateApplicationRequest(this.applicationName); request.setDescription(applicationDescription); CreateApplicationResult result = getService().createApplication(request); return result; } }
@TaskAction public void createApplication() { // to enable conventionMappings feature String appName = getAppName(); String appDesc = getAppDesc(); AwsBeanstalkPluginExtension ext = getProject().getExtensions().getByType(AwsBeanstalkPluginExtension.class); AWSElasticBeanstalk eb = ext.getClient(); DescribeApplicationsResult existingApps = eb.describeApplications(new DescribeApplicationsRequest() .withApplicationNames(appName)); if (existingApps.getApplications().isEmpty()) { eb.createApplication(new CreateApplicationRequest() .withApplicationName(appName) .withDescription(appDesc)); getLogger().info("application " + appName + " (" + appDesc + ") created"); } else { eb.updateApplication(new UpdateApplicationRequest() .withApplicationName(appName) .withDescription(appDesc)); getLogger().info("application " + appName + " (" + appDesc + ") updated"); } } }
public void execute() { checkParams(); AWSElasticBeanstalkClient client = getOrCreateClient(AWSElasticBeanstalkClient.class); CreateApplicationRequest request = new CreateApplicationRequest( applicationName).withDescription(applicationDescription); System.out.println("Creating application " + applicationName + "..."); try { client.createApplication(request); } catch (Exception e) { throw new BuildException( "Exception while attempting to create application: " + e.getMessage(), e); } System.out.println("Application created successfully"); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateApplicationRequest == false) return false; CreateApplicationRequest other = (CreateApplicationRequest) obj; if (other.getApplicationName() == null ^ this.getApplicationName() == null) return false; if (other.getApplicationName() != null && other.getApplicationName().equals(this.getApplicationName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getResourceLifecycleConfig() == null ^ this.getResourceLifecycleConfig() == null) return false; if (other.getResourceLifecycleConfig() != null && other.getResourceLifecycleConfig().equals(this.getResourceLifecycleConfig()) == false) return false; return true; }
/** * <p> * Describes the application. * </p> * * @param description * Describes the application. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateApplicationRequest withDescription(String description) { setDescription(description); return this; }
/** * <p> * The name of the application. * </p> * <p> * Constraint: This name must be unique within your account. If the specified name already exists, the action * returns an <code>InvalidParameterValue</code> error. * </p> * * @param applicationName * The name of the application.</p> * <p> * Constraint: This name must be unique within your account. If the specified name already exists, the action * returns an <code>InvalidParameterValue</code> error. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateApplicationRequest withApplicationName(String applicationName) { setApplicationName(applicationName); return this; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getApplicationName() != null) sb.append("ApplicationName: ").append(getApplicationName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getResourceLifecycleConfig() != null) sb.append("ResourceLifecycleConfig: ").append(getResourceLifecycleConfig()); sb.append("}"); return sb.toString(); }
/** * Constructs a new CreateApplicationRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param applicationName * The name of the application.</p> * <p> * Constraint: This name must be unique within your account. If the specified name already exists, the action * returns an <code>InvalidParameterValue</code> error. */ public CreateApplicationRequest(String applicationName) { setApplicationName(applicationName); }
request.setHttpMethod(HttpMethodName.POST); if (createApplicationRequest.getApplicationName() != null) { request.addParameter("ApplicationName", StringUtils.fromString(createApplicationRequest.getApplicationName())); if (createApplicationRequest.getDescription() != null) { request.addParameter("Description", StringUtils.fromString(createApplicationRequest.getDescription())); ApplicationResourceLifecycleConfig resourceLifecycleConfig = createApplicationRequest.getResourceLifecycleConfig(); if (resourceLifecycleConfig != null) {
/** * <p> * The name of the application. * </p> * <p> * Constraint: This name must be unique within your account. If the specified name already exists, the action * returns an <code>InvalidParameterValue</code> error. * </p> * * @param applicationName * The name of the application.</p> * <p> * Constraint: This name must be unique within your account. If the specified name already exists, the action * returns an <code>InvalidParameterValue</code> error. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateApplicationRequest withApplicationName(String applicationName) { setApplicationName(applicationName); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getApplicationName() == null) ? 0 : getApplicationName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getResourceLifecycleConfig() == null) ? 0 : getResourceLifecycleConfig().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateApplicationRequest == false) return false; CreateApplicationRequest other = (CreateApplicationRequest) obj; if (other.getApplicationName() == null ^ this.getApplicationName() == null) return false; if (other.getApplicationName() != null && other.getApplicationName().equals(this.getApplicationName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getResourceLifecycleConfig() == null ^ this.getResourceLifecycleConfig() == null) return false; if (other.getResourceLifecycleConfig() != null && other.getResourceLifecycleConfig().equals(this.getResourceLifecycleConfig()) == false) return false; return true; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getApplicationName() != null) sb.append("ApplicationName: ").append(getApplicationName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getResourceLifecycleConfig() != null) sb.append("ResourceLifecycleConfig: ").append(getResourceLifecycleConfig()); sb.append("}"); return sb.toString(); }
request.setHttpMethod(HttpMethodName.POST); if (createApplicationRequest.getApplicationName() != null) { request.addParameter("ApplicationName", StringUtils.fromString(createApplicationRequest.getApplicationName())); if (createApplicationRequest.getDescription() != null) { request.addParameter("Description", StringUtils.fromString(createApplicationRequest.getDescription())); ApplicationResourceLifecycleConfig resourceLifecycleConfig = createApplicationRequest.getResourceLifecycleConfig(); if (resourceLifecycleConfig != null) {