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

com.okta.sdk.resource.model.StreamConfigurationDelivery Maven / Gradle / Ivy

Go to download

The Okta Java SDK API .jar provides a Java API that your code can use to make calls to the Okta API. This .jar is the only compile-time dependency within the Okta SDK project that your code should depend on. Implementations of this API (implementation .jars) should be runtime dependencies only.

There is a newer version: 23.0.1
Show newest version
package com.okta.sdk.resource.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.net.URI;
import org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;

/**
 * Contains information about the intended SET delivery method by the receiver
 */
@ApiModel(description = "Contains information about the intended SET delivery method by the receiver")
@JsonPropertyOrder({ StreamConfigurationDelivery.JSON_PROPERTY_AUTHORIZATION_HEADER,
        StreamConfigurationDelivery.JSON_PROPERTY_ENDPOINT_URL, StreamConfigurationDelivery.JSON_PROPERTY_METHOD })
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-11-15T08:48:47.130589-06:00[America/Chicago]", comments = "Generator version: 7.8.0")
public class StreamConfigurationDelivery implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final String JSON_PROPERTY_AUTHORIZATION_HEADER = "authorization_header";
    private JsonNullable authorizationHeader = JsonNullable. undefined();

    public static final String JSON_PROPERTY_ENDPOINT_URL = "endpoint_url";
    private URI endpointUrl;

    /**
     * The delivery method that the transmitter uses for delivering a SET
     */
    public enum MethodEnum {
        HTTPS_SCHEMAS_OPENID_NET_SECEVENT_RISC_DELIVERY_METHOD_PUSH(
                "https://schemas.openid.net/secevent/risc/delivery-method/push"),

        URN_IETF_RFC_8935("urn:ietf:rfc:8935"),

        UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");

        private String value;

        MethodEnum(String value) {
            this.value = value;
        }

        @JsonValue
        public String getValue() {
            return value;
        }

        @Override
        public String toString() {
            return String.valueOf(value);
        }

        @JsonCreator
        public static MethodEnum fromValue(String value) {
            for (MethodEnum b : MethodEnum.values()) {
                if (b.value.equals(value)) {
                    return b;
                }
            }
            return UNKNOWN_DEFAULT_OPEN_API;
        }
    }

    public static final String JSON_PROPERTY_METHOD = "method";
    private MethodEnum method;

    public StreamConfigurationDelivery() {
    }

    public StreamConfigurationDelivery authorizationHeader(String authorizationHeader) {
        this.authorizationHeader = JsonNullable. of(authorizationHeader);

        return this;
    }

    /**
     * The HTTP Authorization header that is included for each HTTP POST request
     *
     * @return authorizationHeader
     **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "{authorizationHeaderValue}", value = "The HTTP Authorization header that is included for each HTTP POST request")
    @JsonIgnore

    public String getAuthorizationHeader() {
        return authorizationHeader.orElse(null);
    }

    @JsonProperty(JSON_PROPERTY_AUTHORIZATION_HEADER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

    public JsonNullable getAuthorizationHeader_JsonNullable() {
        return authorizationHeader;
    }

    @JsonProperty(JSON_PROPERTY_AUTHORIZATION_HEADER)
    public void setAuthorizationHeader_JsonNullable(JsonNullable authorizationHeader) {
        this.authorizationHeader = authorizationHeader;
    }

    public void setAuthorizationHeader(String authorizationHeader) {
        this.authorizationHeader = JsonNullable. of(authorizationHeader);
    }

    public StreamConfigurationDelivery endpointUrl(URI endpointUrl) {

        this.endpointUrl = endpointUrl;
        return this;
    }

    /**
     * The target endpoint URL where the transmitter delivers the SET using HTTP POST requests
     *
     * @return endpointUrl
     **/
    @javax.annotation.Nonnull
    @ApiModelProperty(example = "https://example.com/", required = true, value = "The target endpoint URL where the transmitter delivers the SET using HTTP POST requests")
    @JsonProperty(JSON_PROPERTY_ENDPOINT_URL)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)

    public URI getEndpointUrl() {
        return endpointUrl;
    }

    @JsonProperty(JSON_PROPERTY_ENDPOINT_URL)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public void setEndpointUrl(URI endpointUrl) {
        this.endpointUrl = endpointUrl;
    }

    public StreamConfigurationDelivery method(MethodEnum method) {

        this.method = method;
        return this;
    }

    /**
     * The delivery method that the transmitter uses for delivering a SET
     *
     * @return method
     **/
    @javax.annotation.Nonnull
    @ApiModelProperty(required = true, value = "The delivery method that the transmitter uses for delivering a SET")
    @JsonProperty(JSON_PROPERTY_METHOD)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)

    public MethodEnum getMethod() {
        return method;
    }

    @JsonProperty(JSON_PROPERTY_METHOD)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public void setMethod(MethodEnum method) {
        this.method = method;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        StreamConfigurationDelivery streamConfigurationDelivery = (StreamConfigurationDelivery) o;
        return equalsNullable(this.authorizationHeader, streamConfigurationDelivery.authorizationHeader)
                && Objects.equals(this.endpointUrl, streamConfigurationDelivery.endpointUrl)
                && Objects.equals(this.method, streamConfigurationDelivery.method);
        // ;
    }

    private static  boolean equalsNullable(JsonNullable a, JsonNullable b) {
        return a == b
                || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
    }

    @Override
    public int hashCode() {
        return Objects.hash(hashCodeNullable(authorizationHeader), endpointUrl, method);
    }

    private static  int hashCodeNullable(JsonNullable a) {
        if (a == null) {
            return 1;
        }
        return a.isPresent() ? Arrays.deepHashCode(new Object[] { a.get() }) : 31;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class StreamConfigurationDelivery {\n");
        sb.append("    authorizationHeader: ").append(toIndentedString(authorizationHeader)).append("\n");
        sb.append("    endpointUrl: ").append(toIndentedString(endpointUrl)).append("\n");
        sb.append("    method: ").append(toIndentedString(method)).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(Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy