-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SDK-2448: Add support for requesting, and fetching advanced identity …
…profiles
- Loading branch information
Showing
12 changed files
with
572 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
...i/client/docs/session/create/identityprofile/advanced/AdvancedIdentityProfilePayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package com.yoti.api.client.docs.session.create.identityprofile.advanced; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class AdvancedIdentityProfilePayload { | ||
|
||
@JsonProperty("trust_framework") | ||
private final String trustFramework; | ||
|
||
@JsonProperty("schemes") | ||
private final List<AdvancedIdentityProfileSchemePayload> schemes; | ||
|
||
private AdvancedIdentityProfilePayload(String trustFramework, List<AdvancedIdentityProfileSchemePayload> schemes) { | ||
this.trustFramework = trustFramework; | ||
this.schemes = schemes; | ||
} | ||
|
||
public static AdvancedIdentityProfilePayload.Builder builder() { | ||
return new AdvancedIdentityProfilePayload.Builder(); | ||
} | ||
|
||
/** | ||
* Returns the trust framework of the profile being requested | ||
* | ||
* @return the trust framework | ||
*/ | ||
public String getTrustFramework() { | ||
return trustFramework; | ||
} | ||
|
||
/** | ||
* Returns the schemes being requested under the trust framework | ||
* | ||
* @return the schemes | ||
*/ | ||
public List<AdvancedIdentityProfileSchemePayload> getSchemes() { | ||
return schemes; | ||
} | ||
|
||
public static final class Builder { | ||
|
||
private String trustFramework; | ||
private List<AdvancedIdentityProfileSchemePayload> schemes; | ||
|
||
private Builder() { | ||
schemes = new ArrayList<>(); | ||
} | ||
|
||
/** | ||
* Sets the trust framework of the requested profile | ||
* | ||
* @param trustFramework the trust framework | ||
* @return the builder | ||
*/ | ||
public Builder withTrustFramework(String trustFramework) { | ||
this.trustFramework = trustFramework; | ||
return this; | ||
} | ||
|
||
/** | ||
* Adds a scheme to be requested under the trust framework | ||
* | ||
* @param scheme the scheme | ||
* @return the builder | ||
*/ | ||
public Builder withScheme(AdvancedIdentityProfileSchemePayload scheme) { | ||
this.schemes.add(scheme); | ||
return this; | ||
} | ||
|
||
public AdvancedIdentityProfilePayload build() { | ||
return new AdvancedIdentityProfilePayload(trustFramework, schemes); | ||
} | ||
|
||
} | ||
|
||
} |
49 changes: 49 additions & 0 deletions
49
...s/session/create/identityprofile/advanced/AdvancedIdentityProfileRequirementsPayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.yoti.api.client.docs.session.create.identityprofile.advanced; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class AdvancedIdentityProfileRequirementsPayload { | ||
|
||
@JsonProperty("profiles") | ||
private final List<AdvancedIdentityProfilePayload> profiles; | ||
|
||
private AdvancedIdentityProfileRequirementsPayload(List<AdvancedIdentityProfilePayload> profiles) { | ||
this.profiles = profiles; | ||
} | ||
|
||
public static AdvancedIdentityProfileRequirementsPayload.Builder builder() { | ||
return new AdvancedIdentityProfileRequirementsPayload.Builder(); | ||
} | ||
|
||
/** | ||
* Returns the list of profiles that have been requested as part of the Advanced Identity Profile | ||
* | ||
* @return the list of profiles | ||
*/ | ||
public List<AdvancedIdentityProfilePayload> getProfiles() { | ||
return profiles; | ||
} | ||
|
||
public static final class Builder { | ||
|
||
private List<AdvancedIdentityProfilePayload> profiles; | ||
|
||
private Builder() { | ||
profiles = new ArrayList<>(); | ||
} | ||
|
||
public Builder withProfile(AdvancedIdentityProfilePayload profile) { | ||
this.profiles.add(profile); | ||
return this; | ||
} | ||
|
||
public AdvancedIdentityProfileRequirementsPayload build() { | ||
return new AdvancedIdentityProfileRequirementsPayload(profiles); | ||
} | ||
|
||
} | ||
|
||
} |
53 changes: 53 additions & 0 deletions
53
...s/session/create/identityprofile/advanced/AdvancedIdentityProfileSchemeConfigPayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.yoti.api.client.docs.session.create.identityprofile.advanced; | ||
|
||
import com.yoti.api.client.docs.session.create.filters.DocumentFilter; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class AdvancedIdentityProfileSchemeConfigPayload { | ||
|
||
@JsonProperty("filter") | ||
private final DocumentFilter filter; | ||
|
||
private AdvancedIdentityProfileSchemeConfigPayload(DocumentFilter filter) { | ||
this.filter = filter; | ||
} | ||
|
||
public static AdvancedIdentityProfileSchemeConfigPayload.Builder builder() { | ||
return new AdvancedIdentityProfileSchemeConfigPayload.Builder(); | ||
} | ||
|
||
/** | ||
* Gets the filter for the configuration | ||
* | ||
* @return the filter | ||
*/ | ||
public DocumentFilter getFilter() { | ||
return filter; | ||
} | ||
|
||
public static final class Builder { | ||
|
||
private DocumentFilter filter; | ||
|
||
private Builder() {} | ||
|
||
/** | ||
* Sets the filter for the scheme configuration | ||
* | ||
* @param filter the document filter | ||
* @return the builder | ||
*/ | ||
public Builder withFilter(DocumentFilter filter) { | ||
this.filter = filter; | ||
return this; | ||
} | ||
|
||
public AdvancedIdentityProfileSchemeConfigPayload build() { | ||
return new AdvancedIdentityProfileSchemeConfigPayload(filter); | ||
} | ||
|
||
} | ||
|
||
|
||
} |
Oops, something went wrong.