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

com.amazonaws.services.eks.model.OidcIdentityProviderConfig Maven / Gradle / Ivy

/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.eks.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* An object representing the configuration for an OpenID Connect (OIDC) identity provider. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class OidcIdentityProviderConfig implements Serializable, Cloneable, StructuredPojo { /** *

* The name of the configuration. *

*/ private String identityProviderConfigName; /** *

* The ARN of the configuration. *

*/ private String identityProviderConfigArn; /** *

* The name of your cluster. *

*/ private String clusterName; /** *

* The URL of the OIDC identity provider that allows the API server to discover public signing keys for verifying * tokens. *

*/ private String issuerUrl; /** *

* This is also known as audience. The ID of the client application that makes authentication requests to the * OIDC identity provider. *

*/ private String clientId; /** *

* The JSON Web token (JWT) claim that is used as the username. *

*/ private String usernameClaim; /** *

* The prefix that is prepended to username claims to prevent clashes with existing names. The prefix can't contain * system: *

*/ private String usernamePrefix; /** *

* The JSON web token (JWT) claim that the provider uses to return your groups. *

*/ private String groupsClaim; /** *

* The prefix that is prepended to group claims to prevent clashes with existing names (such as system: * groups). For example, the value oidc: creates group names like oidc:engineering and * oidc:infra. The prefix can't contain system: *

*/ private String groupsPrefix; /** *

* The key-value pairs that describe required claims in the identity token. If set, each claim is verified to be * present in the token with a matching value. *

*/ private java.util.Map requiredClaims; /** *

* Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You * define both. Tags don't propagate to any other cluster or Amazon Web Services resources. *

*/ private java.util.Map tags; /** *

* The status of the OIDC identity provider. *

*/ private String status; /** *

* The name of the configuration. *

* * @param identityProviderConfigName * The name of the configuration. */ public void setIdentityProviderConfigName(String identityProviderConfigName) { this.identityProviderConfigName = identityProviderConfigName; } /** *

* The name of the configuration. *

* * @return The name of the configuration. */ public String getIdentityProviderConfigName() { return this.identityProviderConfigName; } /** *

* The name of the configuration. *

* * @param identityProviderConfigName * The name of the configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig withIdentityProviderConfigName(String identityProviderConfigName) { setIdentityProviderConfigName(identityProviderConfigName); return this; } /** *

* The ARN of the configuration. *

* * @param identityProviderConfigArn * The ARN of the configuration. */ public void setIdentityProviderConfigArn(String identityProviderConfigArn) { this.identityProviderConfigArn = identityProviderConfigArn; } /** *

* The ARN of the configuration. *

* * @return The ARN of the configuration. */ public String getIdentityProviderConfigArn() { return this.identityProviderConfigArn; } /** *

* The ARN of the configuration. *

* * @param identityProviderConfigArn * The ARN of the configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig withIdentityProviderConfigArn(String identityProviderConfigArn) { setIdentityProviderConfigArn(identityProviderConfigArn); return this; } /** *

* The name of your cluster. *

* * @param clusterName * The name of your cluster. */ public void setClusterName(String clusterName) { this.clusterName = clusterName; } /** *

* The name of your cluster. *

* * @return The name of your cluster. */ public String getClusterName() { return this.clusterName; } /** *

* The name of your cluster. *

* * @param clusterName * The name of your cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig withClusterName(String clusterName) { setClusterName(clusterName); return this; } /** *

* The URL of the OIDC identity provider that allows the API server to discover public signing keys for verifying * tokens. *

* * @param issuerUrl * The URL of the OIDC identity provider that allows the API server to discover public signing keys for * verifying tokens. */ public void setIssuerUrl(String issuerUrl) { this.issuerUrl = issuerUrl; } /** *

* The URL of the OIDC identity provider that allows the API server to discover public signing keys for verifying * tokens. *

* * @return The URL of the OIDC identity provider that allows the API server to discover public signing keys for * verifying tokens. */ public String getIssuerUrl() { return this.issuerUrl; } /** *

* The URL of the OIDC identity provider that allows the API server to discover public signing keys for verifying * tokens. *

* * @param issuerUrl * The URL of the OIDC identity provider that allows the API server to discover public signing keys for * verifying tokens. * @return Returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig withIssuerUrl(String issuerUrl) { setIssuerUrl(issuerUrl); return this; } /** *

* This is also known as audience. The ID of the client application that makes authentication requests to the * OIDC identity provider. *

* * @param clientId * This is also known as audience. The ID of the client application that makes authentication requests * to the OIDC identity provider. */ public void setClientId(String clientId) { this.clientId = clientId; } /** *

* This is also known as audience. The ID of the client application that makes authentication requests to the * OIDC identity provider. *

* * @return This is also known as audience. The ID of the client application that makes authentication * requests to the OIDC identity provider. */ public String getClientId() { return this.clientId; } /** *

* This is also known as audience. The ID of the client application that makes authentication requests to the * OIDC identity provider. *

* * @param clientId * This is also known as audience. The ID of the client application that makes authentication requests * to the OIDC identity provider. * @return Returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig withClientId(String clientId) { setClientId(clientId); return this; } /** *

* The JSON Web token (JWT) claim that is used as the username. *

* * @param usernameClaim * The JSON Web token (JWT) claim that is used as the username. */ public void setUsernameClaim(String usernameClaim) { this.usernameClaim = usernameClaim; } /** *

* The JSON Web token (JWT) claim that is used as the username. *

* * @return The JSON Web token (JWT) claim that is used as the username. */ public String getUsernameClaim() { return this.usernameClaim; } /** *

* The JSON Web token (JWT) claim that is used as the username. *

* * @param usernameClaim * The JSON Web token (JWT) claim that is used as the username. * @return Returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig withUsernameClaim(String usernameClaim) { setUsernameClaim(usernameClaim); return this; } /** *

* The prefix that is prepended to username claims to prevent clashes with existing names. The prefix can't contain * system: *

* * @param usernamePrefix * The prefix that is prepended to username claims to prevent clashes with existing names. The prefix can't * contain system: */ public void setUsernamePrefix(String usernamePrefix) { this.usernamePrefix = usernamePrefix; } /** *

* The prefix that is prepended to username claims to prevent clashes with existing names. The prefix can't contain * system: *

* * @return The prefix that is prepended to username claims to prevent clashes with existing names. The prefix can't * contain system: */ public String getUsernamePrefix() { return this.usernamePrefix; } /** *

* The prefix that is prepended to username claims to prevent clashes with existing names. The prefix can't contain * system: *

* * @param usernamePrefix * The prefix that is prepended to username claims to prevent clashes with existing names. The prefix can't * contain system: * @return Returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig withUsernamePrefix(String usernamePrefix) { setUsernamePrefix(usernamePrefix); return this; } /** *

* The JSON web token (JWT) claim that the provider uses to return your groups. *

* * @param groupsClaim * The JSON web token (JWT) claim that the provider uses to return your groups. */ public void setGroupsClaim(String groupsClaim) { this.groupsClaim = groupsClaim; } /** *

* The JSON web token (JWT) claim that the provider uses to return your groups. *

* * @return The JSON web token (JWT) claim that the provider uses to return your groups. */ public String getGroupsClaim() { return this.groupsClaim; } /** *

* The JSON web token (JWT) claim that the provider uses to return your groups. *

* * @param groupsClaim * The JSON web token (JWT) claim that the provider uses to return your groups. * @return Returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig withGroupsClaim(String groupsClaim) { setGroupsClaim(groupsClaim); return this; } /** *

* The prefix that is prepended to group claims to prevent clashes with existing names (such as system: * groups). For example, the value oidc: creates group names like oidc:engineering and * oidc:infra. The prefix can't contain system: *

* * @param groupsPrefix * The prefix that is prepended to group claims to prevent clashes with existing names (such as * system: groups). For example, the value oidc: creates group names like * oidc:engineering and oidc:infra. The prefix can't contain system: */ public void setGroupsPrefix(String groupsPrefix) { this.groupsPrefix = groupsPrefix; } /** *

* The prefix that is prepended to group claims to prevent clashes with existing names (such as system: * groups). For example, the value oidc: creates group names like oidc:engineering and * oidc:infra. The prefix can't contain system: *

* * @return The prefix that is prepended to group claims to prevent clashes with existing names (such as * system: groups). For example, the value oidc: creates group names like * oidc:engineering and oidc:infra. The prefix can't contain system: */ public String getGroupsPrefix() { return this.groupsPrefix; } /** *

* The prefix that is prepended to group claims to prevent clashes with existing names (such as system: * groups). For example, the value oidc: creates group names like oidc:engineering and * oidc:infra. The prefix can't contain system: *

* * @param groupsPrefix * The prefix that is prepended to group claims to prevent clashes with existing names (such as * system: groups). For example, the value oidc: creates group names like * oidc:engineering and oidc:infra. The prefix can't contain system: * @return Returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig withGroupsPrefix(String groupsPrefix) { setGroupsPrefix(groupsPrefix); return this; } /** *

* The key-value pairs that describe required claims in the identity token. If set, each claim is verified to be * present in the token with a matching value. *

* * @return The key-value pairs that describe required claims in the identity token. If set, each claim is verified * to be present in the token with a matching value. */ public java.util.Map getRequiredClaims() { return requiredClaims; } /** *

* The key-value pairs that describe required claims in the identity token. If set, each claim is verified to be * present in the token with a matching value. *

* * @param requiredClaims * The key-value pairs that describe required claims in the identity token. If set, each claim is verified to * be present in the token with a matching value. */ public void setRequiredClaims(java.util.Map requiredClaims) { this.requiredClaims = requiredClaims; } /** *

* The key-value pairs that describe required claims in the identity token. If set, each claim is verified to be * present in the token with a matching value. *

* * @param requiredClaims * The key-value pairs that describe required claims in the identity token. If set, each claim is verified to * be present in the token with a matching value. * @return Returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig withRequiredClaims(java.util.Map requiredClaims) { setRequiredClaims(requiredClaims); return this; } /** * Add a single RequiredClaims entry * * @see OidcIdentityProviderConfig#withRequiredClaims * @returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig addRequiredClaimsEntry(String key, String value) { if (null == this.requiredClaims) { this.requiredClaims = new java.util.HashMap(); } if (this.requiredClaims.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.requiredClaims.put(key, value); return this; } /** * Removes all the entries added into RequiredClaims. * * @return Returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig clearRequiredClaimsEntries() { this.requiredClaims = null; return this; } /** *

* Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You * define both. Tags don't propagate to any other cluster or Amazon Web Services resources. *

* * @return Metadata that assists with categorization and organization. Each tag consists of a key and an optional * value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources. */ public java.util.Map getTags() { return tags; } /** *

* Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You * define both. Tags don't propagate to any other cluster or Amazon Web Services resources. *

* * @param tags * Metadata that assists with categorization and organization. Each tag consists of a key and an optional * value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You * define both. Tags don't propagate to any other cluster or Amazon Web Services resources. *

* * @param tags * Metadata that assists with categorization and organization. Each tag consists of a key and an optional * value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources. * @return Returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see OidcIdentityProviderConfig#withTags * @returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public OidcIdentityProviderConfig clearTagsEntries() { this.tags = null; return this; } /** *

* The status of the OIDC identity provider. *

* * @param status * The status of the OIDC identity provider. * @see ConfigStatus */ public void setStatus(String status) { this.status = status; } /** *

* The status of the OIDC identity provider. *

* * @return The status of the OIDC identity provider. * @see ConfigStatus */ public String getStatus() { return this.status; } /** *

* The status of the OIDC identity provider. *

* * @param status * The status of the OIDC identity provider. * @return Returns a reference to this object so that method calls can be chained together. * @see ConfigStatus */ public OidcIdentityProviderConfig withStatus(String status) { setStatus(status); return this; } /** *

* The status of the OIDC identity provider. *

* * @param status * The status of the OIDC identity provider. * @return Returns a reference to this object so that method calls can be chained together. * @see ConfigStatus */ public OidcIdentityProviderConfig withStatus(ConfigStatus status) { this.status = status.toString(); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getIdentityProviderConfigName() != null) sb.append("IdentityProviderConfigName: ").append(getIdentityProviderConfigName()).append(","); if (getIdentityProviderConfigArn() != null) sb.append("IdentityProviderConfigArn: ").append(getIdentityProviderConfigArn()).append(","); if (getClusterName() != null) sb.append("ClusterName: ").append(getClusterName()).append(","); if (getIssuerUrl() != null) sb.append("IssuerUrl: ").append(getIssuerUrl()).append(","); if (getClientId() != null) sb.append("ClientId: ").append(getClientId()).append(","); if (getUsernameClaim() != null) sb.append("UsernameClaim: ").append(getUsernameClaim()).append(","); if (getUsernamePrefix() != null) sb.append("UsernamePrefix: ").append(getUsernamePrefix()).append(","); if (getGroupsClaim() != null) sb.append("GroupsClaim: ").append(getGroupsClaim()).append(","); if (getGroupsPrefix() != null) sb.append("GroupsPrefix: ").append(getGroupsPrefix()).append(","); if (getRequiredClaims() != null) sb.append("RequiredClaims: ").append(getRequiredClaims()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof OidcIdentityProviderConfig == false) return false; OidcIdentityProviderConfig other = (OidcIdentityProviderConfig) obj; if (other.getIdentityProviderConfigName() == null ^ this.getIdentityProviderConfigName() == null) return false; if (other.getIdentityProviderConfigName() != null && other.getIdentityProviderConfigName().equals(this.getIdentityProviderConfigName()) == false) return false; if (other.getIdentityProviderConfigArn() == null ^ this.getIdentityProviderConfigArn() == null) return false; if (other.getIdentityProviderConfigArn() != null && other.getIdentityProviderConfigArn().equals(this.getIdentityProviderConfigArn()) == false) return false; if (other.getClusterName() == null ^ this.getClusterName() == null) return false; if (other.getClusterName() != null && other.getClusterName().equals(this.getClusterName()) == false) return false; if (other.getIssuerUrl() == null ^ this.getIssuerUrl() == null) return false; if (other.getIssuerUrl() != null && other.getIssuerUrl().equals(this.getIssuerUrl()) == false) return false; if (other.getClientId() == null ^ this.getClientId() == null) return false; if (other.getClientId() != null && other.getClientId().equals(this.getClientId()) == false) return false; if (other.getUsernameClaim() == null ^ this.getUsernameClaim() == null) return false; if (other.getUsernameClaim() != null && other.getUsernameClaim().equals(this.getUsernameClaim()) == false) return false; if (other.getUsernamePrefix() == null ^ this.getUsernamePrefix() == null) return false; if (other.getUsernamePrefix() != null && other.getUsernamePrefix().equals(this.getUsernamePrefix()) == false) return false; if (other.getGroupsClaim() == null ^ this.getGroupsClaim() == null) return false; if (other.getGroupsClaim() != null && other.getGroupsClaim().equals(this.getGroupsClaim()) == false) return false; if (other.getGroupsPrefix() == null ^ this.getGroupsPrefix() == null) return false; if (other.getGroupsPrefix() != null && other.getGroupsPrefix().equals(this.getGroupsPrefix()) == false) return false; if (other.getRequiredClaims() == null ^ this.getRequiredClaims() == null) return false; if (other.getRequiredClaims() != null && other.getRequiredClaims().equals(this.getRequiredClaims()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIdentityProviderConfigName() == null) ? 0 : getIdentityProviderConfigName().hashCode()); hashCode = prime * hashCode + ((getIdentityProviderConfigArn() == null) ? 0 : getIdentityProviderConfigArn().hashCode()); hashCode = prime * hashCode + ((getClusterName() == null) ? 0 : getClusterName().hashCode()); hashCode = prime * hashCode + ((getIssuerUrl() == null) ? 0 : getIssuerUrl().hashCode()); hashCode = prime * hashCode + ((getClientId() == null) ? 0 : getClientId().hashCode()); hashCode = prime * hashCode + ((getUsernameClaim() == null) ? 0 : getUsernameClaim().hashCode()); hashCode = prime * hashCode + ((getUsernamePrefix() == null) ? 0 : getUsernamePrefix().hashCode()); hashCode = prime * hashCode + ((getGroupsClaim() == null) ? 0 : getGroupsClaim().hashCode()); hashCode = prime * hashCode + ((getGroupsPrefix() == null) ? 0 : getGroupsPrefix().hashCode()); hashCode = prime * hashCode + ((getRequiredClaims() == null) ? 0 : getRequiredClaims().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); return hashCode; } @Override public OidcIdentityProviderConfig clone() { try { return (OidcIdentityProviderConfig) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.eks.model.transform.OidcIdentityProviderConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy