com.azure.resourcemanager.appplatform.models.BuildProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-appplatform Show documentation
Show all versions of azure-resourcemanager-appplatform Show documentation
This package contains Microsoft Azure App Platform Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.appplatform.models;
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
/**
* Build resource properties payload.
*/
@Fluent
public final class BuildProperties {
/*
* The relative path of source code
*/
@JsonProperty(value = "relativePath")
private String relativePath;
/*
* The resource id of builder to build the source code
*/
@JsonProperty(value = "builder")
private String builder;
/*
* The resource id of agent pool
*/
@JsonProperty(value = "agentPool")
private String agentPool;
/*
* Provisioning state of the KPack build result
*/
@JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private BuildProvisioningState provisioningState;
/*
* The environment variables for this build
*/
@JsonProperty(value = "env")
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map env;
/*
* The APMs for this build
*/
@JsonProperty(value = "apms")
private List apms;
/*
* The CA Certificates for this build
*/
@JsonProperty(value = "certificates")
private List certificates;
/*
* The build result triggered by this build
*/
@JsonProperty(value = "triggeredBuildResult", access = JsonProperty.Access.WRITE_ONLY)
private TriggeredBuildResult triggeredBuildResult;
/*
* The customized build resource for this build
*/
@JsonProperty(value = "resourceRequests")
private BuildResourceRequests resourceRequests;
/**
* Creates an instance of BuildProperties class.
*/
public BuildProperties() {
}
/**
* Get the relativePath property: The relative path of source code.
*
* @return the relativePath value.
*/
public String relativePath() {
return this.relativePath;
}
/**
* Set the relativePath property: The relative path of source code.
*
* @param relativePath the relativePath value to set.
* @return the BuildProperties object itself.
*/
public BuildProperties withRelativePath(String relativePath) {
this.relativePath = relativePath;
return this;
}
/**
* Get the builder property: The resource id of builder to build the source code.
*
* @return the builder value.
*/
public String builder() {
return this.builder;
}
/**
* Set the builder property: The resource id of builder to build the source code.
*
* @param builder the builder value to set.
* @return the BuildProperties object itself.
*/
public BuildProperties withBuilder(String builder) {
this.builder = builder;
return this;
}
/**
* Get the agentPool property: The resource id of agent pool.
*
* @return the agentPool value.
*/
public String agentPool() {
return this.agentPool;
}
/**
* Set the agentPool property: The resource id of agent pool.
*
* @param agentPool the agentPool value to set.
* @return the BuildProperties object itself.
*/
public BuildProperties withAgentPool(String agentPool) {
this.agentPool = agentPool;
return this;
}
/**
* Get the provisioningState property: Provisioning state of the KPack build result.
*
* @return the provisioningState value.
*/
public BuildProvisioningState provisioningState() {
return this.provisioningState;
}
/**
* Get the env property: The environment variables for this build.
*
* @return the env value.
*/
public Map env() {
return this.env;
}
/**
* Set the env property: The environment variables for this build.
*
* @param env the env value to set.
* @return the BuildProperties object itself.
*/
public BuildProperties withEnv(Map env) {
this.env = env;
return this;
}
/**
* Get the apms property: The APMs for this build.
*
* @return the apms value.
*/
public List apms() {
return this.apms;
}
/**
* Set the apms property: The APMs for this build.
*
* @param apms the apms value to set.
* @return the BuildProperties object itself.
*/
public BuildProperties withApms(List apms) {
this.apms = apms;
return this;
}
/**
* Get the certificates property: The CA Certificates for this build.
*
* @return the certificates value.
*/
public List certificates() {
return this.certificates;
}
/**
* Set the certificates property: The CA Certificates for this build.
*
* @param certificates the certificates value to set.
* @return the BuildProperties object itself.
*/
public BuildProperties withCertificates(List certificates) {
this.certificates = certificates;
return this;
}
/**
* Get the triggeredBuildResult property: The build result triggered by this build.
*
* @return the triggeredBuildResult value.
*/
public TriggeredBuildResult triggeredBuildResult() {
return this.triggeredBuildResult;
}
/**
* Get the resourceRequests property: The customized build resource for this build.
*
* @return the resourceRequests value.
*/
public BuildResourceRequests resourceRequests() {
return this.resourceRequests;
}
/**
* Set the resourceRequests property: The customized build resource for this build.
*
* @param resourceRequests the resourceRequests value to set.
* @return the BuildProperties object itself.
*/
public BuildProperties withResourceRequests(BuildResourceRequests resourceRequests) {
this.resourceRequests = resourceRequests;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (apms() != null) {
apms().forEach(e -> e.validate());
}
if (certificates() != null) {
certificates().forEach(e -> e.validate());
}
if (triggeredBuildResult() != null) {
triggeredBuildResult().validate();
}
if (resourceRequests() != null) {
resourceRequests().validate();
}
}
}