
com.amazon.ask.smapi.model.v1.skill.BuildStep Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ask-smapi-model Show documentation
Show all versions of ask-smapi-model Show documentation
Contains models and api clients for Alexa
The newest version!
/*
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
* except in compliance with the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
* the specific language governing permissions and limitations under the License.
*/
package com.amazon.ask.smapi.model.v1.skill;
import java.util.Objects;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
/**
* Describes the status of a build step.
*/
@JsonDeserialize(builder = BuildStep.Builder.class)
public final class BuildStep {
@JsonProperty("name")
private String name = null;
@JsonProperty("status")
private String status = null;
@JsonProperty("errors")
private List errors = new ArrayList();
private BuildStep() {
}
public static Builder builder() {
return new Builder();
}
private BuildStep(Builder builder) {
if (builder.name != null) {
this.name = builder.name;
}
if (builder.status != null) {
this.status = builder.status;
}
if (builder.errors != null) {
this.errors = builder.errors;
}
}
/**
* Get name
*
* For this enum type, if a value unknown to the SDK is returned the UNKNOWN_TO_SDK_VERSION
* enumeration value will be returned. To directly return the raw String value, use getNameAsString().
*
* @return name
**/
public com.amazon.ask.smapi.model.v1.skill.BuildStepName getName() {
return com.amazon.ask.smapi.model.v1.skill.BuildStepName.fromValue(name);
}
/**
* Get the underlying String value for name.
*
* Using this accessor will retrieve the raw underlying value, even if it is not
* present in the corresponding enumeration. For forward compatibility, it is recommended
* to use this approach over the enumeration.
*
* @return name as a String value
**/
@JsonProperty("name")
public String getNameAsString() {
return name;
}
/**
* Get status
*
* For this enum type, if a value unknown to the SDK is returned the UNKNOWN_TO_SDK_VERSION
* enumeration value will be returned. To directly return the raw String value, use getStatusAsString().
*
* @return status
**/
public com.amazon.ask.smapi.model.v1.skill.Status getStatus() {
return com.amazon.ask.smapi.model.v1.skill.Status.fromValue(status);
}
/**
* Get the underlying String value for status.
*
* Using this accessor will retrieve the raw underlying value, even if it is not
* present in the corresponding enumeration. For forward compatibility, it is recommended
* to use this approach over the enumeration.
*
* @return status as a String value
**/
@JsonProperty("status")
public String getStatusAsString() {
return status;
}
/**
* Get errors
* @return errors
**/
@JsonProperty("errors")
public List getErrors() {
return errors;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BuildStep v1SkillBuildStep = (BuildStep) o;
return Objects.equals(this.name, v1SkillBuildStep.name) &&
Objects.equals(this.status, v1SkillBuildStep.status) &&
Objects.equals(this.errors, v1SkillBuildStep.errors);
}
@Override
public int hashCode() {
return Objects.hash(name, status, errors);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BuildStep {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" errors: ").append(toIndentedString(errors)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static class Builder {
private String name;
private String status;
private List errors;
private Builder() {}
@JsonProperty("name")
public Builder withName(String name) {
this.name = name;
return this;
}
public Builder withName(com.amazon.ask.smapi.model.v1.skill.BuildStepName name) {
this.name = name != null ? name.toString() : null;
return this;
}
@JsonProperty("status")
public Builder withStatus(String status) {
this.status = status;
return this;
}
public Builder withStatus(com.amazon.ask.smapi.model.v1.skill.Status status) {
this.status = status != null ? status.toString() : null;
return this;
}
@JsonProperty("errors")
public Builder withErrors(List errors) {
this.errors = errors;
return this;
}
public Builder addErrorsItem(com.amazon.ask.smapi.model.v1.skill.StandardizedError errorsItem) {
if (this.errors == null) {
this.errors = new ArrayList();
}
this.errors.add(errorsItem);
return this;
}
public BuildStep build() {
return new BuildStep(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy