com.clarifai.grpc.api.PasswordViolations Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/resources.proto
package com.clarifai.grpc.api;
/**
*
* PasswordViolations
*
*
* Protobuf type {@code clarifai.api.PasswordViolations}
*/
public final class PasswordViolations extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.PasswordViolations)
PasswordViolationsOrBuilder {
private static final long serialVersionUID = 0L;
// Use PasswordViolations.newBuilder() to construct.
private PasswordViolations(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PasswordViolations() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PasswordViolations();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PasswordViolations(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
minimumLength_ = input.readBool();
break;
}
case 16: {
maximumLength_ = input.readBool();
break;
}
case 24: {
upperCaseNeeded_ = input.readBool();
break;
}
case 32: {
lowerCaseNeeded_ = input.readBool();
break;
}
case 40: {
numericNeeded_ = input.readBool();
break;
}
case 48: {
nonAlphanumericNeeded_ = input.readBool();
break;
}
case 56: {
passwordReuse_ = input.readBool();
break;
}
case 64: {
excludeNames_ = input.readBool();
break;
}
case 72: {
excludeEmail_ = input.readBool();
break;
}
case 80: {
noConfusingLetters_ = input.readBool();
break;
}
case 88: {
noSimplePasswords_ = input.readBool();
break;
}
case 96: {
noCommonVocabs_ = input.readBool();
break;
}
case 104: {
noOverlapWithOld_ = input.readBool();
break;
}
case 112: {
passwordLifespan_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_PasswordViolations_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_PasswordViolations_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.PasswordViolations.class, com.clarifai.grpc.api.PasswordViolations.Builder.class);
}
public static final int MINIMUM_LENGTH_FIELD_NUMBER = 1;
private boolean minimumLength_;
/**
*
* when new password length is shorter than minimum length set
*
*
* bool minimum_length = 1;
* @return The minimumLength.
*/
@java.lang.Override
public boolean getMinimumLength() {
return minimumLength_;
}
public static final int MAXIMUM_LENGTH_FIELD_NUMBER = 2;
private boolean maximumLength_;
/**
*
* when new password length is longer than maximum length set
*
*
* bool maximum_length = 2;
* @return The maximumLength.
*/
@java.lang.Override
public boolean getMaximumLength() {
return maximumLength_;
}
public static final int UPPER_CASE_NEEDED_FIELD_NUMBER = 3;
private boolean upperCaseNeeded_;
/**
*
* there is no upper case letter in the new password when there should be at least one
*
*
* bool upper_case_needed = 3;
* @return The upperCaseNeeded.
*/
@java.lang.Override
public boolean getUpperCaseNeeded() {
return upperCaseNeeded_;
}
public static final int LOWER_CASE_NEEDED_FIELD_NUMBER = 4;
private boolean lowerCaseNeeded_;
/**
*
* there is no lower case letter in the new password when there should be at least one
*
*
* bool lower_case_needed = 4;
* @return The lowerCaseNeeded.
*/
@java.lang.Override
public boolean getLowerCaseNeeded() {
return lowerCaseNeeded_;
}
public static final int NUMERIC_NEEDED_FIELD_NUMBER = 5;
private boolean numericNeeded_;
/**
*
* there is no numerics in the new password when there should be at least one
*
*
* bool numeric_needed = 5;
* @return The numericNeeded.
*/
@java.lang.Override
public boolean getNumericNeeded() {
return numericNeeded_;
}
public static final int NON_ALPHANUMERIC_NEEDED_FIELD_NUMBER = 6;
private boolean nonAlphanumericNeeded_;
/**
*
* there is no special character in the new password when there should be at least one
*
*
* bool non_alphanumeric_needed = 6;
* @return The nonAlphanumericNeeded.
*/
@java.lang.Override
public boolean getNonAlphanumericNeeded() {
return nonAlphanumericNeeded_;
}
public static final int PASSWORD_REUSE_FIELD_NUMBER = 7;
private boolean passwordReuse_;
/**
*
* when one of the N most recent old password is reused, N is specified by password_reuse_epoch in db.password_policies
*
*
* bool password_reuse = 7;
* @return The passwordReuse.
*/
@java.lang.Override
public boolean getPasswordReuse() {
return passwordReuse_;
}
public static final int EXCLUDE_NAMES_FIELD_NUMBER = 8;
private boolean excludeNames_;
/**
*
* when either user's first, middle or last name is used in the new password
*
*
* bool exclude_names = 8;
* @return The excludeNames.
*/
@java.lang.Override
public boolean getExcludeNames() {
return excludeNames_;
}
public static final int EXCLUDE_EMAIL_FIELD_NUMBER = 9;
private boolean excludeEmail_;
/**
*
* when first part of user's email (exact string or after removing special characters) is used in the new password
*
*
* bool exclude_email = 9;
* @return The excludeEmail.
*/
@java.lang.Override
public boolean getExcludeEmail() {
return excludeEmail_;
}
public static final int NO_CONFUSING_LETTERS_FIELD_NUMBER = 10;
private boolean noConfusingLetters_;
/**
*
* when there are confusing letters in the new password, such as o (first character of 'omega') vs 0 (zero)
*
*
* bool no_confusing_letters = 10;
* @return The noConfusingLetters.
*/
@java.lang.Override
public boolean getNoConfusingLetters() {
return noConfusingLetters_;
}
public static final int NO_SIMPLE_PASSWORDS_FIELD_NUMBER = 11;
private boolean noSimplePasswords_;
/**
*
* when there are simple password patterns used, such as 12345678 or aaaaaaa1
*
*
* bool no_simple_passwords = 11;
* @return The noSimplePasswords.
*/
@java.lang.Override
public boolean getNoSimplePasswords() {
return noSimplePasswords_;
}
public static final int NO_COMMON_VOCABS_FIELD_NUMBER = 12;
private boolean noCommonVocabs_;
/**
*
* when there are common vocabs from the common vocab list used
*
*
* bool no_common_vocabs = 12;
* @return The noCommonVocabs.
*/
@java.lang.Override
public boolean getNoCommonVocabs() {
return noCommonVocabs_;
}
public static final int NO_OVERLAP_WITH_OLD_FIELD_NUMBER = 13;
private boolean noOverlapWithOld_;
/**
*
* when the current password is contained in the new password or vice versa
*
*
* bool no_overlap_with_old = 13;
* @return The noOverlapWithOld.
*/
@java.lang.Override
public boolean getNoOverlapWithOld() {
return noOverlapWithOld_;
}
public static final int PASSWORD_LIFESPAN_FIELD_NUMBER = 14;
private boolean passwordLifespan_;
/**
*
* when password has to be changed becauase it's too old
*
*
* bool password_lifespan = 14;
* @return The passwordLifespan.
*/
@java.lang.Override
public boolean getPasswordLifespan() {
return passwordLifespan_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (minimumLength_ != false) {
output.writeBool(1, minimumLength_);
}
if (maximumLength_ != false) {
output.writeBool(2, maximumLength_);
}
if (upperCaseNeeded_ != false) {
output.writeBool(3, upperCaseNeeded_);
}
if (lowerCaseNeeded_ != false) {
output.writeBool(4, lowerCaseNeeded_);
}
if (numericNeeded_ != false) {
output.writeBool(5, numericNeeded_);
}
if (nonAlphanumericNeeded_ != false) {
output.writeBool(6, nonAlphanumericNeeded_);
}
if (passwordReuse_ != false) {
output.writeBool(7, passwordReuse_);
}
if (excludeNames_ != false) {
output.writeBool(8, excludeNames_);
}
if (excludeEmail_ != false) {
output.writeBool(9, excludeEmail_);
}
if (noConfusingLetters_ != false) {
output.writeBool(10, noConfusingLetters_);
}
if (noSimplePasswords_ != false) {
output.writeBool(11, noSimplePasswords_);
}
if (noCommonVocabs_ != false) {
output.writeBool(12, noCommonVocabs_);
}
if (noOverlapWithOld_ != false) {
output.writeBool(13, noOverlapWithOld_);
}
if (passwordLifespan_ != false) {
output.writeBool(14, passwordLifespan_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (minimumLength_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, minimumLength_);
}
if (maximumLength_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, maximumLength_);
}
if (upperCaseNeeded_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, upperCaseNeeded_);
}
if (lowerCaseNeeded_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, lowerCaseNeeded_);
}
if (numericNeeded_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, numericNeeded_);
}
if (nonAlphanumericNeeded_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, nonAlphanumericNeeded_);
}
if (passwordReuse_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, passwordReuse_);
}
if (excludeNames_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(8, excludeNames_);
}
if (excludeEmail_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(9, excludeEmail_);
}
if (noConfusingLetters_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(10, noConfusingLetters_);
}
if (noSimplePasswords_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(11, noSimplePasswords_);
}
if (noCommonVocabs_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(12, noCommonVocabs_);
}
if (noOverlapWithOld_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(13, noOverlapWithOld_);
}
if (passwordLifespan_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(14, passwordLifespan_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.clarifai.grpc.api.PasswordViolations)) {
return super.equals(obj);
}
com.clarifai.grpc.api.PasswordViolations other = (com.clarifai.grpc.api.PasswordViolations) obj;
if (getMinimumLength()
!= other.getMinimumLength()) return false;
if (getMaximumLength()
!= other.getMaximumLength()) return false;
if (getUpperCaseNeeded()
!= other.getUpperCaseNeeded()) return false;
if (getLowerCaseNeeded()
!= other.getLowerCaseNeeded()) return false;
if (getNumericNeeded()
!= other.getNumericNeeded()) return false;
if (getNonAlphanumericNeeded()
!= other.getNonAlphanumericNeeded()) return false;
if (getPasswordReuse()
!= other.getPasswordReuse()) return false;
if (getExcludeNames()
!= other.getExcludeNames()) return false;
if (getExcludeEmail()
!= other.getExcludeEmail()) return false;
if (getNoConfusingLetters()
!= other.getNoConfusingLetters()) return false;
if (getNoSimplePasswords()
!= other.getNoSimplePasswords()) return false;
if (getNoCommonVocabs()
!= other.getNoCommonVocabs()) return false;
if (getNoOverlapWithOld()
!= other.getNoOverlapWithOld()) return false;
if (getPasswordLifespan()
!= other.getPasswordLifespan()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + MINIMUM_LENGTH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getMinimumLength());
hash = (37 * hash) + MAXIMUM_LENGTH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getMaximumLength());
hash = (37 * hash) + UPPER_CASE_NEEDED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getUpperCaseNeeded());
hash = (37 * hash) + LOWER_CASE_NEEDED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getLowerCaseNeeded());
hash = (37 * hash) + NUMERIC_NEEDED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getNumericNeeded());
hash = (37 * hash) + NON_ALPHANUMERIC_NEEDED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getNonAlphanumericNeeded());
hash = (37 * hash) + PASSWORD_REUSE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getPasswordReuse());
hash = (37 * hash) + EXCLUDE_NAMES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getExcludeNames());
hash = (37 * hash) + EXCLUDE_EMAIL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getExcludeEmail());
hash = (37 * hash) + NO_CONFUSING_LETTERS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getNoConfusingLetters());
hash = (37 * hash) + NO_SIMPLE_PASSWORDS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getNoSimplePasswords());
hash = (37 * hash) + NO_COMMON_VOCABS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getNoCommonVocabs());
hash = (37 * hash) + NO_OVERLAP_WITH_OLD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getNoOverlapWithOld());
hash = (37 * hash) + PASSWORD_LIFESPAN_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getPasswordLifespan());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.PasswordViolations parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.PasswordViolations parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.PasswordViolations parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.PasswordViolations parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.PasswordViolations parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.PasswordViolations parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.PasswordViolations parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.PasswordViolations parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.clarifai.grpc.api.PasswordViolations parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.PasswordViolations parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.clarifai.grpc.api.PasswordViolations parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.PasswordViolations parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.clarifai.grpc.api.PasswordViolations prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* PasswordViolations
*
*
* Protobuf type {@code clarifai.api.PasswordViolations}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.PasswordViolations)
com.clarifai.grpc.api.PasswordViolationsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_PasswordViolations_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_PasswordViolations_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.PasswordViolations.class, com.clarifai.grpc.api.PasswordViolations.Builder.class);
}
// Construct using com.clarifai.grpc.api.PasswordViolations.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
minimumLength_ = false;
maximumLength_ = false;
upperCaseNeeded_ = false;
lowerCaseNeeded_ = false;
numericNeeded_ = false;
nonAlphanumericNeeded_ = false;
passwordReuse_ = false;
excludeNames_ = false;
excludeEmail_ = false;
noConfusingLetters_ = false;
noSimplePasswords_ = false;
noCommonVocabs_ = false;
noOverlapWithOld_ = false;
passwordLifespan_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_PasswordViolations_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.PasswordViolations getDefaultInstanceForType() {
return com.clarifai.grpc.api.PasswordViolations.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.PasswordViolations build() {
com.clarifai.grpc.api.PasswordViolations result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.PasswordViolations buildPartial() {
com.clarifai.grpc.api.PasswordViolations result = new com.clarifai.grpc.api.PasswordViolations(this);
result.minimumLength_ = minimumLength_;
result.maximumLength_ = maximumLength_;
result.upperCaseNeeded_ = upperCaseNeeded_;
result.lowerCaseNeeded_ = lowerCaseNeeded_;
result.numericNeeded_ = numericNeeded_;
result.nonAlphanumericNeeded_ = nonAlphanumericNeeded_;
result.passwordReuse_ = passwordReuse_;
result.excludeNames_ = excludeNames_;
result.excludeEmail_ = excludeEmail_;
result.noConfusingLetters_ = noConfusingLetters_;
result.noSimplePasswords_ = noSimplePasswords_;
result.noCommonVocabs_ = noCommonVocabs_;
result.noOverlapWithOld_ = noOverlapWithOld_;
result.passwordLifespan_ = passwordLifespan_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.clarifai.grpc.api.PasswordViolations) {
return mergeFrom((com.clarifai.grpc.api.PasswordViolations)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.PasswordViolations other) {
if (other == com.clarifai.grpc.api.PasswordViolations.getDefaultInstance()) return this;
if (other.getMinimumLength() != false) {
setMinimumLength(other.getMinimumLength());
}
if (other.getMaximumLength() != false) {
setMaximumLength(other.getMaximumLength());
}
if (other.getUpperCaseNeeded() != false) {
setUpperCaseNeeded(other.getUpperCaseNeeded());
}
if (other.getLowerCaseNeeded() != false) {
setLowerCaseNeeded(other.getLowerCaseNeeded());
}
if (other.getNumericNeeded() != false) {
setNumericNeeded(other.getNumericNeeded());
}
if (other.getNonAlphanumericNeeded() != false) {
setNonAlphanumericNeeded(other.getNonAlphanumericNeeded());
}
if (other.getPasswordReuse() != false) {
setPasswordReuse(other.getPasswordReuse());
}
if (other.getExcludeNames() != false) {
setExcludeNames(other.getExcludeNames());
}
if (other.getExcludeEmail() != false) {
setExcludeEmail(other.getExcludeEmail());
}
if (other.getNoConfusingLetters() != false) {
setNoConfusingLetters(other.getNoConfusingLetters());
}
if (other.getNoSimplePasswords() != false) {
setNoSimplePasswords(other.getNoSimplePasswords());
}
if (other.getNoCommonVocabs() != false) {
setNoCommonVocabs(other.getNoCommonVocabs());
}
if (other.getNoOverlapWithOld() != false) {
setNoOverlapWithOld(other.getNoOverlapWithOld());
}
if (other.getPasswordLifespan() != false) {
setPasswordLifespan(other.getPasswordLifespan());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.clarifai.grpc.api.PasswordViolations parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.PasswordViolations) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private boolean minimumLength_ ;
/**
*
* when new password length is shorter than minimum length set
*
*
* bool minimum_length = 1;
* @return The minimumLength.
*/
@java.lang.Override
public boolean getMinimumLength() {
return minimumLength_;
}
/**
*
* when new password length is shorter than minimum length set
*
*
* bool minimum_length = 1;
* @param value The minimumLength to set.
* @return This builder for chaining.
*/
public Builder setMinimumLength(boolean value) {
minimumLength_ = value;
onChanged();
return this;
}
/**
*
* when new password length is shorter than minimum length set
*
*
* bool minimum_length = 1;
* @return This builder for chaining.
*/
public Builder clearMinimumLength() {
minimumLength_ = false;
onChanged();
return this;
}
private boolean maximumLength_ ;
/**
*
* when new password length is longer than maximum length set
*
*
* bool maximum_length = 2;
* @return The maximumLength.
*/
@java.lang.Override
public boolean getMaximumLength() {
return maximumLength_;
}
/**
*
* when new password length is longer than maximum length set
*
*
* bool maximum_length = 2;
* @param value The maximumLength to set.
* @return This builder for chaining.
*/
public Builder setMaximumLength(boolean value) {
maximumLength_ = value;
onChanged();
return this;
}
/**
*
* when new password length is longer than maximum length set
*
*
* bool maximum_length = 2;
* @return This builder for chaining.
*/
public Builder clearMaximumLength() {
maximumLength_ = false;
onChanged();
return this;
}
private boolean upperCaseNeeded_ ;
/**
*
* there is no upper case letter in the new password when there should be at least one
*
*
* bool upper_case_needed = 3;
* @return The upperCaseNeeded.
*/
@java.lang.Override
public boolean getUpperCaseNeeded() {
return upperCaseNeeded_;
}
/**
*
* there is no upper case letter in the new password when there should be at least one
*
*
* bool upper_case_needed = 3;
* @param value The upperCaseNeeded to set.
* @return This builder for chaining.
*/
public Builder setUpperCaseNeeded(boolean value) {
upperCaseNeeded_ = value;
onChanged();
return this;
}
/**
*
* there is no upper case letter in the new password when there should be at least one
*
*
* bool upper_case_needed = 3;
* @return This builder for chaining.
*/
public Builder clearUpperCaseNeeded() {
upperCaseNeeded_ = false;
onChanged();
return this;
}
private boolean lowerCaseNeeded_ ;
/**
*
* there is no lower case letter in the new password when there should be at least one
*
*
* bool lower_case_needed = 4;
* @return The lowerCaseNeeded.
*/
@java.lang.Override
public boolean getLowerCaseNeeded() {
return lowerCaseNeeded_;
}
/**
*
* there is no lower case letter in the new password when there should be at least one
*
*
* bool lower_case_needed = 4;
* @param value The lowerCaseNeeded to set.
* @return This builder for chaining.
*/
public Builder setLowerCaseNeeded(boolean value) {
lowerCaseNeeded_ = value;
onChanged();
return this;
}
/**
*
* there is no lower case letter in the new password when there should be at least one
*
*
* bool lower_case_needed = 4;
* @return This builder for chaining.
*/
public Builder clearLowerCaseNeeded() {
lowerCaseNeeded_ = false;
onChanged();
return this;
}
private boolean numericNeeded_ ;
/**
*
* there is no numerics in the new password when there should be at least one
*
*
* bool numeric_needed = 5;
* @return The numericNeeded.
*/
@java.lang.Override
public boolean getNumericNeeded() {
return numericNeeded_;
}
/**
*
* there is no numerics in the new password when there should be at least one
*
*
* bool numeric_needed = 5;
* @param value The numericNeeded to set.
* @return This builder for chaining.
*/
public Builder setNumericNeeded(boolean value) {
numericNeeded_ = value;
onChanged();
return this;
}
/**
*
* there is no numerics in the new password when there should be at least one
*
*
* bool numeric_needed = 5;
* @return This builder for chaining.
*/
public Builder clearNumericNeeded() {
numericNeeded_ = false;
onChanged();
return this;
}
private boolean nonAlphanumericNeeded_ ;
/**
*
* there is no special character in the new password when there should be at least one
*
*
* bool non_alphanumeric_needed = 6;
* @return The nonAlphanumericNeeded.
*/
@java.lang.Override
public boolean getNonAlphanumericNeeded() {
return nonAlphanumericNeeded_;
}
/**
*
* there is no special character in the new password when there should be at least one
*
*
* bool non_alphanumeric_needed = 6;
* @param value The nonAlphanumericNeeded to set.
* @return This builder for chaining.
*/
public Builder setNonAlphanumericNeeded(boolean value) {
nonAlphanumericNeeded_ = value;
onChanged();
return this;
}
/**
*
* there is no special character in the new password when there should be at least one
*
*
* bool non_alphanumeric_needed = 6;
* @return This builder for chaining.
*/
public Builder clearNonAlphanumericNeeded() {
nonAlphanumericNeeded_ = false;
onChanged();
return this;
}
private boolean passwordReuse_ ;
/**
*
* when one of the N most recent old password is reused, N is specified by password_reuse_epoch in db.password_policies
*
*
* bool password_reuse = 7;
* @return The passwordReuse.
*/
@java.lang.Override
public boolean getPasswordReuse() {
return passwordReuse_;
}
/**
*
* when one of the N most recent old password is reused, N is specified by password_reuse_epoch in db.password_policies
*
*
* bool password_reuse = 7;
* @param value The passwordReuse to set.
* @return This builder for chaining.
*/
public Builder setPasswordReuse(boolean value) {
passwordReuse_ = value;
onChanged();
return this;
}
/**
*
* when one of the N most recent old password is reused, N is specified by password_reuse_epoch in db.password_policies
*
*
* bool password_reuse = 7;
* @return This builder for chaining.
*/
public Builder clearPasswordReuse() {
passwordReuse_ = false;
onChanged();
return this;
}
private boolean excludeNames_ ;
/**
*
* when either user's first, middle or last name is used in the new password
*
*
* bool exclude_names = 8;
* @return The excludeNames.
*/
@java.lang.Override
public boolean getExcludeNames() {
return excludeNames_;
}
/**
*
* when either user's first, middle or last name is used in the new password
*
*
* bool exclude_names = 8;
* @param value The excludeNames to set.
* @return This builder for chaining.
*/
public Builder setExcludeNames(boolean value) {
excludeNames_ = value;
onChanged();
return this;
}
/**
*
* when either user's first, middle or last name is used in the new password
*
*
* bool exclude_names = 8;
* @return This builder for chaining.
*/
public Builder clearExcludeNames() {
excludeNames_ = false;
onChanged();
return this;
}
private boolean excludeEmail_ ;
/**
*
* when first part of user's email (exact string or after removing special characters) is used in the new password
*
*
* bool exclude_email = 9;
* @return The excludeEmail.
*/
@java.lang.Override
public boolean getExcludeEmail() {
return excludeEmail_;
}
/**
*
* when first part of user's email (exact string or after removing special characters) is used in the new password
*
*
* bool exclude_email = 9;
* @param value The excludeEmail to set.
* @return This builder for chaining.
*/
public Builder setExcludeEmail(boolean value) {
excludeEmail_ = value;
onChanged();
return this;
}
/**
*
* when first part of user's email (exact string or after removing special characters) is used in the new password
*
*
* bool exclude_email = 9;
* @return This builder for chaining.
*/
public Builder clearExcludeEmail() {
excludeEmail_ = false;
onChanged();
return this;
}
private boolean noConfusingLetters_ ;
/**
*
* when there are confusing letters in the new password, such as o (first character of 'omega') vs 0 (zero)
*
*
* bool no_confusing_letters = 10;
* @return The noConfusingLetters.
*/
@java.lang.Override
public boolean getNoConfusingLetters() {
return noConfusingLetters_;
}
/**
*
* when there are confusing letters in the new password, such as o (first character of 'omega') vs 0 (zero)
*
*
* bool no_confusing_letters = 10;
* @param value The noConfusingLetters to set.
* @return This builder for chaining.
*/
public Builder setNoConfusingLetters(boolean value) {
noConfusingLetters_ = value;
onChanged();
return this;
}
/**
*
* when there are confusing letters in the new password, such as o (first character of 'omega') vs 0 (zero)
*
*
* bool no_confusing_letters = 10;
* @return This builder for chaining.
*/
public Builder clearNoConfusingLetters() {
noConfusingLetters_ = false;
onChanged();
return this;
}
private boolean noSimplePasswords_ ;
/**
*
* when there are simple password patterns used, such as 12345678 or aaaaaaa1
*
*
* bool no_simple_passwords = 11;
* @return The noSimplePasswords.
*/
@java.lang.Override
public boolean getNoSimplePasswords() {
return noSimplePasswords_;
}
/**
*
* when there are simple password patterns used, such as 12345678 or aaaaaaa1
*
*
* bool no_simple_passwords = 11;
* @param value The noSimplePasswords to set.
* @return This builder for chaining.
*/
public Builder setNoSimplePasswords(boolean value) {
noSimplePasswords_ = value;
onChanged();
return this;
}
/**
*
* when there are simple password patterns used, such as 12345678 or aaaaaaa1
*
*
* bool no_simple_passwords = 11;
* @return This builder for chaining.
*/
public Builder clearNoSimplePasswords() {
noSimplePasswords_ = false;
onChanged();
return this;
}
private boolean noCommonVocabs_ ;
/**
*
* when there are common vocabs from the common vocab list used
*
*
* bool no_common_vocabs = 12;
* @return The noCommonVocabs.
*/
@java.lang.Override
public boolean getNoCommonVocabs() {
return noCommonVocabs_;
}
/**
*
* when there are common vocabs from the common vocab list used
*
*
* bool no_common_vocabs = 12;
* @param value The noCommonVocabs to set.
* @return This builder for chaining.
*/
public Builder setNoCommonVocabs(boolean value) {
noCommonVocabs_ = value;
onChanged();
return this;
}
/**
*
* when there are common vocabs from the common vocab list used
*
*
* bool no_common_vocabs = 12;
* @return This builder for chaining.
*/
public Builder clearNoCommonVocabs() {
noCommonVocabs_ = false;
onChanged();
return this;
}
private boolean noOverlapWithOld_ ;
/**
*
* when the current password is contained in the new password or vice versa
*
*
* bool no_overlap_with_old = 13;
* @return The noOverlapWithOld.
*/
@java.lang.Override
public boolean getNoOverlapWithOld() {
return noOverlapWithOld_;
}
/**
*
* when the current password is contained in the new password or vice versa
*
*
* bool no_overlap_with_old = 13;
* @param value The noOverlapWithOld to set.
* @return This builder for chaining.
*/
public Builder setNoOverlapWithOld(boolean value) {
noOverlapWithOld_ = value;
onChanged();
return this;
}
/**
*
* when the current password is contained in the new password or vice versa
*
*
* bool no_overlap_with_old = 13;
* @return This builder for chaining.
*/
public Builder clearNoOverlapWithOld() {
noOverlapWithOld_ = false;
onChanged();
return this;
}
private boolean passwordLifespan_ ;
/**
*
* when password has to be changed becauase it's too old
*
*
* bool password_lifespan = 14;
* @return The passwordLifespan.
*/
@java.lang.Override
public boolean getPasswordLifespan() {
return passwordLifespan_;
}
/**
*
* when password has to be changed becauase it's too old
*
*
* bool password_lifespan = 14;
* @param value The passwordLifespan to set.
* @return This builder for chaining.
*/
public Builder setPasswordLifespan(boolean value) {
passwordLifespan_ = value;
onChanged();
return this;
}
/**
*
* when password has to be changed becauase it's too old
*
*
* bool password_lifespan = 14;
* @return This builder for chaining.
*/
public Builder clearPasswordLifespan() {
passwordLifespan_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:clarifai.api.PasswordViolations)
}
// @@protoc_insertion_point(class_scope:clarifai.api.PasswordViolations)
private static final com.clarifai.grpc.api.PasswordViolations DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.PasswordViolations();
}
public static com.clarifai.grpc.api.PasswordViolations getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PasswordViolations parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PasswordViolations(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.clarifai.grpc.api.PasswordViolations getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}