![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.netapp.models.LdapSearchScopeOpt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-netapp Show documentation
Show all versions of azure-resourcemanager-netapp Show documentation
This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-preview-2024-07-01-preview.
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.netapp.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* LDAP search scope.
*/
@Fluent
public final class LdapSearchScopeOpt implements JsonSerializable {
/*
* This specifies the user DN, which overrides the base DN for user lookups.
*/
private String userDN;
/*
* This specifies the group DN, which overrides the base DN for group lookups.
*/
private String groupDN;
/*
* This specifies the custom LDAP search filter to be used when looking up group membership from LDAP server.
*/
private String groupMembershipFilter;
/**
* Creates an instance of LdapSearchScopeOpt class.
*/
public LdapSearchScopeOpt() {
}
/**
* Get the userDN property: This specifies the user DN, which overrides the base DN for user lookups.
*
* @return the userDN value.
*/
public String userDN() {
return this.userDN;
}
/**
* Set the userDN property: This specifies the user DN, which overrides the base DN for user lookups.
*
* @param userDN the userDN value to set.
* @return the LdapSearchScopeOpt object itself.
*/
public LdapSearchScopeOpt withUserDN(String userDN) {
this.userDN = userDN;
return this;
}
/**
* Get the groupDN property: This specifies the group DN, which overrides the base DN for group lookups.
*
* @return the groupDN value.
*/
public String groupDN() {
return this.groupDN;
}
/**
* Set the groupDN property: This specifies the group DN, which overrides the base DN for group lookups.
*
* @param groupDN the groupDN value to set.
* @return the LdapSearchScopeOpt object itself.
*/
public LdapSearchScopeOpt withGroupDN(String groupDN) {
this.groupDN = groupDN;
return this;
}
/**
* Get the groupMembershipFilter property: This specifies the custom LDAP search filter to be used when looking up
* group membership from LDAP server.
*
* @return the groupMembershipFilter value.
*/
public String groupMembershipFilter() {
return this.groupMembershipFilter;
}
/**
* Set the groupMembershipFilter property: This specifies the custom LDAP search filter to be used when looking up
* group membership from LDAP server.
*
* @param groupMembershipFilter the groupMembershipFilter value to set.
* @return the LdapSearchScopeOpt object itself.
*/
public LdapSearchScopeOpt withGroupMembershipFilter(String groupMembershipFilter) {
this.groupMembershipFilter = groupMembershipFilter;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("userDN", this.userDN);
jsonWriter.writeStringField("groupDN", this.groupDN);
jsonWriter.writeStringField("groupMembershipFilter", this.groupMembershipFilter);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of LdapSearchScopeOpt from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of LdapSearchScopeOpt if the JsonReader was pointing to an instance of it, or null if it was
* pointing to JSON null.
* @throws IOException If an error occurs while reading the LdapSearchScopeOpt.
*/
public static LdapSearchScopeOpt fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
LdapSearchScopeOpt deserializedLdapSearchScopeOpt = new LdapSearchScopeOpt();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("userDN".equals(fieldName)) {
deserializedLdapSearchScopeOpt.userDN = reader.getString();
} else if ("groupDN".equals(fieldName)) {
deserializedLdapSearchScopeOpt.groupDN = reader.getString();
} else if ("groupMembershipFilter".equals(fieldName)) {
deserializedLdapSearchScopeOpt.groupMembershipFilter = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedLdapSearchScopeOpt;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy