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

com.pulumi.azurenative.apimanagement.outputs.ResponseContractResponse Maven / Gradle / Ivy

There is a newer version: 2.82.0
Show 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.azurenative.apimanagement.outputs;

import com.pulumi.azurenative.apimanagement.outputs.ParameterContractResponse;
import com.pulumi.azurenative.apimanagement.outputs.RepresentationContractResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
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 ResponseContractResponse {
    /**
     * @return Operation response description.
     * 
     */
    private @Nullable String description;
    /**
     * @return Collection of operation response headers.
     * 
     */
    private @Nullable List headers;
    /**
     * @return Collection of operation response representations.
     * 
     */
    private @Nullable List representations;
    /**
     * @return Operation response HTTP status code.
     * 
     */
    private Integer statusCode;

    private ResponseContractResponse() {}
    /**
     * @return Operation response description.
     * 
     */
    public Optional description() {
        return Optional.ofNullable(this.description);
    }
    /**
     * @return Collection of operation response headers.
     * 
     */
    public List headers() {
        return this.headers == null ? List.of() : this.headers;
    }
    /**
     * @return Collection of operation response representations.
     * 
     */
    public List representations() {
        return this.representations == null ? List.of() : this.representations;
    }
    /**
     * @return Operation response HTTP status code.
     * 
     */
    public Integer statusCode() {
        return this.statusCode;
    }

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

    public static Builder builder(ResponseContractResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String description;
        private @Nullable List headers;
        private @Nullable List representations;
        private Integer statusCode;
        public Builder() {}
        public Builder(ResponseContractResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.description = defaults.description;
    	      this.headers = defaults.headers;
    	      this.representations = defaults.representations;
    	      this.statusCode = defaults.statusCode;
        }

        @CustomType.Setter
        public Builder description(@Nullable String description) {

            this.description = description;
            return this;
        }
        @CustomType.Setter
        public Builder headers(@Nullable List headers) {

            this.headers = headers;
            return this;
        }
        public Builder headers(ParameterContractResponse... headers) {
            return headers(List.of(headers));
        }
        @CustomType.Setter
        public Builder representations(@Nullable List representations) {

            this.representations = representations;
            return this;
        }
        public Builder representations(RepresentationContractResponse... representations) {
            return representations(List.of(representations));
        }
        @CustomType.Setter
        public Builder statusCode(Integer statusCode) {
            if (statusCode == null) {
              throw new MissingRequiredPropertyException("ResponseContractResponse", "statusCode");
            }
            this.statusCode = statusCode;
            return this;
        }
        public ResponseContractResponse build() {
            final var _resultValue = new ResponseContractResponse();
            _resultValue.description = description;
            _resultValue.headers = headers;
            _resultValue.representations = representations;
            _resultValue.statusCode = statusCode;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy