All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.github.outputs.GetRepositoryPullRequestResult Maven / Gradle / Ivy

The newest version!
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.github.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class GetRepositoryPullRequestResult {
    /**
     * @return Name of the ref (branch) of the Pull Request base.
     * 
     */
    private String baseRef;
    private String baseRepository;
    /**
     * @return Head commit SHA of the Pull Request base.
     * 
     */
    private String baseSha;
    /**
     * @return Body of the Pull Request.
     * 
     */
    private String body;
    /**
     * @return Indicates Whether this Pull Request is a draft.
     * 
     */
    private Boolean draft;
    /**
     * @return Owner of the Pull Request head repository.
     * 
     */
    private String headOwner;
    private String headRef;
    /**
     * @return Name of the Pull Request head repository.
     * 
     */
    private String headRepository;
    /**
     * @return Head commit SHA of the Pull Request head.
     * 
     */
    private String headSha;
    /**
     * @return The provider-assigned unique ID for this managed resource.
     * 
     */
    private String id;
    /**
     * @return List of label names set on the Pull Request.
     * 
     */
    private List labels;
    /**
     * @return Indicates whether the base repository maintainers can modify the Pull Request.
     * 
     */
    private Boolean maintainerCanModify;
    private Integer number;
    /**
     * @return Unix timestamp indicating the Pull Request creation time.
     * 
     */
    private Integer openedAt;
    /**
     * @return GitHub login of the user who opened the Pull Request.
     * 
     */
    private String openedBy;
    private @Nullable String owner;
    /**
     * @return the current Pull Request state - can be "open", "closed" or "merged".
     * 
     */
    private String state;
    /**
     * @return The title of the Pull Request.
     * 
     */
    private String title;
    /**
     * @return The timestamp of the last Pull Request update.
     * 
     */
    private Integer updatedAt;

    private GetRepositoryPullRequestResult() {}
    /**
     * @return Name of the ref (branch) of the Pull Request base.
     * 
     */
    public String baseRef() {
        return this.baseRef;
    }
    public String baseRepository() {
        return this.baseRepository;
    }
    /**
     * @return Head commit SHA of the Pull Request base.
     * 
     */
    public String baseSha() {
        return this.baseSha;
    }
    /**
     * @return Body of the Pull Request.
     * 
     */
    public String body() {
        return this.body;
    }
    /**
     * @return Indicates Whether this Pull Request is a draft.
     * 
     */
    public Boolean draft() {
        return this.draft;
    }
    /**
     * @return Owner of the Pull Request head repository.
     * 
     */
    public String headOwner() {
        return this.headOwner;
    }
    public String headRef() {
        return this.headRef;
    }
    /**
     * @return Name of the Pull Request head repository.
     * 
     */
    public String headRepository() {
        return this.headRepository;
    }
    /**
     * @return Head commit SHA of the Pull Request head.
     * 
     */
    public String headSha() {
        return this.headSha;
    }
    /**
     * @return The provider-assigned unique ID for this managed resource.
     * 
     */
    public String id() {
        return this.id;
    }
    /**
     * @return List of label names set on the Pull Request.
     * 
     */
    public List labels() {
        return this.labels;
    }
    /**
     * @return Indicates whether the base repository maintainers can modify the Pull Request.
     * 
     */
    public Boolean maintainerCanModify() {
        return this.maintainerCanModify;
    }
    public Integer number() {
        return this.number;
    }
    /**
     * @return Unix timestamp indicating the Pull Request creation time.
     * 
     */
    public Integer openedAt() {
        return this.openedAt;
    }
    /**
     * @return GitHub login of the user who opened the Pull Request.
     * 
     */
    public String openedBy() {
        return this.openedBy;
    }
    public Optional owner() {
        return Optional.ofNullable(this.owner);
    }
    /**
     * @return the current Pull Request state - can be "open", "closed" or "merged".
     * 
     */
    public String state() {
        return this.state;
    }
    /**
     * @return The title of the Pull Request.
     * 
     */
    public String title() {
        return this.title;
    }
    /**
     * @return The timestamp of the last Pull Request update.
     * 
     */
    public Integer updatedAt() {
        return this.updatedAt;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(GetRepositoryPullRequestResult defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String baseRef;
        private String baseRepository;
        private String baseSha;
        private String body;
        private Boolean draft;
        private String headOwner;
        private String headRef;
        private String headRepository;
        private String headSha;
        private String id;
        private List labels;
        private Boolean maintainerCanModify;
        private Integer number;
        private Integer openedAt;
        private String openedBy;
        private @Nullable String owner;
        private String state;
        private String title;
        private Integer updatedAt;
        public Builder() {}
        public Builder(GetRepositoryPullRequestResult defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.baseRef = defaults.baseRef;
    	      this.baseRepository = defaults.baseRepository;
    	      this.baseSha = defaults.baseSha;
    	      this.body = defaults.body;
    	      this.draft = defaults.draft;
    	      this.headOwner = defaults.headOwner;
    	      this.headRef = defaults.headRef;
    	      this.headRepository = defaults.headRepository;
    	      this.headSha = defaults.headSha;
    	      this.id = defaults.id;
    	      this.labels = defaults.labels;
    	      this.maintainerCanModify = defaults.maintainerCanModify;
    	      this.number = defaults.number;
    	      this.openedAt = defaults.openedAt;
    	      this.openedBy = defaults.openedBy;
    	      this.owner = defaults.owner;
    	      this.state = defaults.state;
    	      this.title = defaults.title;
    	      this.updatedAt = defaults.updatedAt;
        }

        @CustomType.Setter
        public Builder baseRef(String baseRef) {
            if (baseRef == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "baseRef");
            }
            this.baseRef = baseRef;
            return this;
        }
        @CustomType.Setter
        public Builder baseRepository(String baseRepository) {
            if (baseRepository == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "baseRepository");
            }
            this.baseRepository = baseRepository;
            return this;
        }
        @CustomType.Setter
        public Builder baseSha(String baseSha) {
            if (baseSha == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "baseSha");
            }
            this.baseSha = baseSha;
            return this;
        }
        @CustomType.Setter
        public Builder body(String body) {
            if (body == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "body");
            }
            this.body = body;
            return this;
        }
        @CustomType.Setter
        public Builder draft(Boolean draft) {
            if (draft == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "draft");
            }
            this.draft = draft;
            return this;
        }
        @CustomType.Setter
        public Builder headOwner(String headOwner) {
            if (headOwner == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "headOwner");
            }
            this.headOwner = headOwner;
            return this;
        }
        @CustomType.Setter
        public Builder headRef(String headRef) {
            if (headRef == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "headRef");
            }
            this.headRef = headRef;
            return this;
        }
        @CustomType.Setter
        public Builder headRepository(String headRepository) {
            if (headRepository == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "headRepository");
            }
            this.headRepository = headRepository;
            return this;
        }
        @CustomType.Setter
        public Builder headSha(String headSha) {
            if (headSha == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "headSha");
            }
            this.headSha = headSha;
            return this;
        }
        @CustomType.Setter
        public Builder id(String id) {
            if (id == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "id");
            }
            this.id = id;
            return this;
        }
        @CustomType.Setter
        public Builder labels(List labels) {
            if (labels == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "labels");
            }
            this.labels = labels;
            return this;
        }
        public Builder labels(String... labels) {
            return labels(List.of(labels));
        }
        @CustomType.Setter
        public Builder maintainerCanModify(Boolean maintainerCanModify) {
            if (maintainerCanModify == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "maintainerCanModify");
            }
            this.maintainerCanModify = maintainerCanModify;
            return this;
        }
        @CustomType.Setter
        public Builder number(Integer number) {
            if (number == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "number");
            }
            this.number = number;
            return this;
        }
        @CustomType.Setter
        public Builder openedAt(Integer openedAt) {
            if (openedAt == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "openedAt");
            }
            this.openedAt = openedAt;
            return this;
        }
        @CustomType.Setter
        public Builder openedBy(String openedBy) {
            if (openedBy == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "openedBy");
            }
            this.openedBy = openedBy;
            return this;
        }
        @CustomType.Setter
        public Builder owner(@Nullable String owner) {

            this.owner = owner;
            return this;
        }
        @CustomType.Setter
        public Builder state(String state) {
            if (state == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "state");
            }
            this.state = state;
            return this;
        }
        @CustomType.Setter
        public Builder title(String title) {
            if (title == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "title");
            }
            this.title = title;
            return this;
        }
        @CustomType.Setter
        public Builder updatedAt(Integer updatedAt) {
            if (updatedAt == null) {
              throw new MissingRequiredPropertyException("GetRepositoryPullRequestResult", "updatedAt");
            }
            this.updatedAt = updatedAt;
            return this;
        }
        public GetRepositoryPullRequestResult build() {
            final var _resultValue = new GetRepositoryPullRequestResult();
            _resultValue.baseRef = baseRef;
            _resultValue.baseRepository = baseRepository;
            _resultValue.baseSha = baseSha;
            _resultValue.body = body;
            _resultValue.draft = draft;
            _resultValue.headOwner = headOwner;
            _resultValue.headRef = headRef;
            _resultValue.headRepository = headRepository;
            _resultValue.headSha = headSha;
            _resultValue.id = id;
            _resultValue.labels = labels;
            _resultValue.maintainerCanModify = maintainerCanModify;
            _resultValue.number = number;
            _resultValue.openedAt = openedAt;
            _resultValue.openedBy = openedBy;
            _resultValue.owner = owner;
            _resultValue.state = state;
            _resultValue.title = title;
            _resultValue.updatedAt = updatedAt;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy