io.github.primelib.jira4j.restv2.spec.GetWorkflowTransitionRuleConfigurationsOperationSpec Maven / Gradle / Ivy
Show all versions of jira4j-rest-v2 Show documentation
package io.github.primelib.jira4j.restv2.spec;
import java.util.Objects;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.annotation.processing.Generated;
import io.github.primelib.jira4j.restv2.model.Configuration;
import io.github.primelib.jira4j.restv2.model.GetWorkflowTransitionRuleConfigurationsRequest;
import java.util.Set;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.function.Consumer;
/**
* GetWorkflowTransitionRuleConfigurationsSpec
*
* Specification for the GetWorkflowTransitionRuleConfigurations operation.
*
* Get workflow transition rule configurations
*/
@Getter
@Setter
@EqualsAndHashCode
@ToString
@Accessors(fluent = true, chain = true)
@NoArgsConstructor(access = AccessLevel.PROTECTED, force = true)
@Builder
@Generated(value = "io.github.primelib.primecodegen.javafeign.JavaFeignGenerator")
public class GetWorkflowTransitionRuleConfigurationsOperationSpec {
/**
* allows to disable validation of the spec, use with care!
*/
@ApiStatus.Experimental
public static Boolean VALIDATION_ENABLED = true;
/**
* The types of the transition rules to return.
*/
@NotNull
private Set types;
/**
*/
@NotNull
private GetWorkflowTransitionRuleConfigurationsRequest getWorkflowTransitionRuleConfigurationsRequest;
/**
* The index of the first item to return in a page of results (page offset).
*/
@Nullable
private Long startAt;
/**
* The maximum number of items to return per page.
*/
@Nullable
private Integer maxResults;
/**
* The transition rule class keys, as defined in the Connect or the Forge app descriptor, of the transition rules to return.
*/
@Nullable
private Set keys;
/**
* The list of workflow names to filter by.
*/
@Nullable
private Set workflowNames;
/**
* The list of {@code tags} to filter by.
*/
@Nullable
private Set withTags;
/**
* Whether draft or published workflows are returned. If not provided, both workflow types are returned.
*/
@Nullable
private Boolean draft;
/**
* Use [expand](#expansion) to include additional information in the response. This parameter accepts {@code transition}, which, for each rule, returns information about the transition the rule is assigned to.
*/
@Nullable
private String expand;
/**
* Constructs a validated instance of {@link GetWorkflowTransitionRuleConfigurationsOperationSpec}.
*
* @param spec the specification to process
*/
@ApiStatus.Internal
public GetWorkflowTransitionRuleConfigurationsOperationSpec(Consumer spec) {
spec.accept(this);
if (VALIDATION_ENABLED)
validate();
}
/**
* Constructs a validated instance of {@link GetWorkflowTransitionRuleConfigurationsOperationSpec}.
*
* NOTE: This constructor is not considered stable and may change if the operation is updated.
* @param types The types of the transition rules to return.
* @param getWorkflowTransitionRuleConfigurationsRequest
* @param startAt The index of the first item to return in a page of results (page offset).
* @param maxResults The maximum number of items to return per page.
* @param keys The transition rule class keys, as defined in the Connect or the Forge app descriptor, of the transition rules to return.
* @param workflowNames The list of workflow names to filter by.
* @param withTags The list of {@code tags} to filter by.
* @param draft Whether draft or published workflows are returned. If not provided, both workflow types are returned.
* @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts {@code transition}, which, for each rule, returns information about the transition the rule is assigned to.
*/
@ApiStatus.Internal
public GetWorkflowTransitionRuleConfigurationsOperationSpec(Set types, GetWorkflowTransitionRuleConfigurationsRequest getWorkflowTransitionRuleConfigurationsRequest, Long startAt, Integer maxResults, Set keys, Set workflowNames, Set withTags, Boolean draft, String expand) {
this.types = types;
this.getWorkflowTransitionRuleConfigurationsRequest = getWorkflowTransitionRuleConfigurationsRequest;
this.startAt = startAt;
this.maxResults = maxResults;
this.keys = keys;
this.workflowNames = workflowNames;
this.withTags = withTags;
this.draft = draft;
this.expand = expand;
if (VALIDATION_ENABLED)
validate();
}
/**
* Validates the Spec, will throw a exception if required parameters are missing
*
* @throws NullPointerException
*/
public void validate() {
Objects.requireNonNull(types, "types is a required parameter!");
Objects.requireNonNull(getWorkflowTransitionRuleConfigurationsRequest, "getWorkflowTransitionRuleConfigurationsRequest is a required parameter!");
}
}