![JAR search and dependency download from the Maven repository](/logo.png)
ru.tinkoff.piapi.contract.v1.Account Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: users.proto
package ru.tinkoff.piapi.contract.v1;
/**
*
*Информация о счёте.
*
*
* Protobuf type {@code tinkoff.public.invest.api.contract.v1.Account}
*/
public final class Account extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tinkoff.public.invest.api.contract.v1.Account)
AccountOrBuilder {
private static final long serialVersionUID = 0L;
// Use Account.newBuilder() to construct.
private Account(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Account() {
id_ = "";
type_ = 0;
name_ = "";
status_ = 0;
accessLevel_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Account();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Users.internal_static_tinkoff_public_invest_api_contract_v1_Account_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ru.tinkoff.piapi.contract.v1.Users.internal_static_tinkoff_public_invest_api_contract_v1_Account_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.Account.class, ru.tinkoff.piapi.contract.v1.Account.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
* Идентификатор счёта.
*
*
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
* Идентификатор счёта.
*
*
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TYPE_FIELD_NUMBER = 2;
private int type_ = 0;
/**
*
* Тип счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountType type = 2;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Тип счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountType type = 2;
* @return The type.
*/
@java.lang.Override public ru.tinkoff.piapi.contract.v1.AccountType getType() {
ru.tinkoff.piapi.contract.v1.AccountType result = ru.tinkoff.piapi.contract.v1.AccountType.forNumber(type_);
return result == null ? ru.tinkoff.piapi.contract.v1.AccountType.UNRECOGNIZED : result;
}
public static final int NAME_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
* Название счёта.
*
*
* string name = 3;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* Название счёта.
*
*
* string name = 3;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATUS_FIELD_NUMBER = 4;
private int status_ = 0;
/**
*
* Статус счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountStatus status = 4;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Статус счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountStatus status = 4;
* @return The status.
*/
@java.lang.Override public ru.tinkoff.piapi.contract.v1.AccountStatus getStatus() {
ru.tinkoff.piapi.contract.v1.AccountStatus result = ru.tinkoff.piapi.contract.v1.AccountStatus.forNumber(status_);
return result == null ? ru.tinkoff.piapi.contract.v1.AccountStatus.UNRECOGNIZED : result;
}
public static final int OPENED_DATE_FIELD_NUMBER = 5;
private com.google.protobuf.Timestamp openedDate_;
/**
*
* Дата открытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp opened_date = 5;
* @return Whether the openedDate field is set.
*/
@java.lang.Override
public boolean hasOpenedDate() {
return openedDate_ != null;
}
/**
*
* Дата открытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp opened_date = 5;
* @return The openedDate.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getOpenedDate() {
return openedDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : openedDate_;
}
/**
*
* Дата открытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp opened_date = 5;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getOpenedDateOrBuilder() {
return openedDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : openedDate_;
}
public static final int CLOSED_DATE_FIELD_NUMBER = 6;
private com.google.protobuf.Timestamp closedDate_;
/**
*
* Дата закрытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp closed_date = 6;
* @return Whether the closedDate field is set.
*/
@java.lang.Override
public boolean hasClosedDate() {
return closedDate_ != null;
}
/**
*
* Дата закрытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp closed_date = 6;
* @return The closedDate.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getClosedDate() {
return closedDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : closedDate_;
}
/**
*
* Дата закрытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp closed_date = 6;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getClosedDateOrBuilder() {
return closedDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : closedDate_;
}
public static final int ACCESS_LEVEL_FIELD_NUMBER = 7;
private int accessLevel_ = 0;
/**
*
* Уровень доступа к текущему счёту (определяется токеном).
*
*
* .tinkoff.public.invest.api.contract.v1.AccessLevel access_level = 7;
* @return The enum numeric value on the wire for accessLevel.
*/
@java.lang.Override public int getAccessLevelValue() {
return accessLevel_;
}
/**
*
* Уровень доступа к текущему счёту (определяется токеном).
*
*
* .tinkoff.public.invest.api.contract.v1.AccessLevel access_level = 7;
* @return The accessLevel.
*/
@java.lang.Override public ru.tinkoff.piapi.contract.v1.AccessLevel getAccessLevel() {
ru.tinkoff.piapi.contract.v1.AccessLevel result = ru.tinkoff.piapi.contract.v1.AccessLevel.forNumber(accessLevel_);
return result == null ? ru.tinkoff.piapi.contract.v1.AccessLevel.UNRECOGNIZED : result;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (type_ != ru.tinkoff.piapi.contract.v1.AccountType.ACCOUNT_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(2, type_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
}
if (status_ != ru.tinkoff.piapi.contract.v1.AccountStatus.ACCOUNT_STATUS_UNSPECIFIED.getNumber()) {
output.writeEnum(4, status_);
}
if (openedDate_ != null) {
output.writeMessage(5, getOpenedDate());
}
if (closedDate_ != null) {
output.writeMessage(6, getClosedDate());
}
if (accessLevel_ != ru.tinkoff.piapi.contract.v1.AccessLevel.ACCOUNT_ACCESS_LEVEL_UNSPECIFIED.getNumber()) {
output.writeEnum(7, accessLevel_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (type_ != ru.tinkoff.piapi.contract.v1.AccountType.ACCOUNT_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, type_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
}
if (status_ != ru.tinkoff.piapi.contract.v1.AccountStatus.ACCOUNT_STATUS_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, status_);
}
if (openedDate_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getOpenedDate());
}
if (closedDate_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getClosedDate());
}
if (accessLevel_ != ru.tinkoff.piapi.contract.v1.AccessLevel.ACCOUNT_ACCESS_LEVEL_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(7, accessLevel_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ru.tinkoff.piapi.contract.v1.Account)) {
return super.equals(obj);
}
ru.tinkoff.piapi.contract.v1.Account other = (ru.tinkoff.piapi.contract.v1.Account) obj;
if (!getId()
.equals(other.getId())) return false;
if (type_ != other.type_) return false;
if (!getName()
.equals(other.getName())) return false;
if (status_ != other.status_) return false;
if (hasOpenedDate() != other.hasOpenedDate()) return false;
if (hasOpenedDate()) {
if (!getOpenedDate()
.equals(other.getOpenedDate())) return false;
}
if (hasClosedDate() != other.hasClosedDate()) return false;
if (hasClosedDate()) {
if (!getClosedDate()
.equals(other.getClosedDate())) return false;
}
if (accessLevel_ != other.accessLevel_) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
if (hasOpenedDate()) {
hash = (37 * hash) + OPENED_DATE_FIELD_NUMBER;
hash = (53 * hash) + getOpenedDate().hashCode();
}
if (hasClosedDate()) {
hash = (37 * hash) + CLOSED_DATE_FIELD_NUMBER;
hash = (53 * hash) + getClosedDate().hashCode();
}
hash = (37 * hash) + ACCESS_LEVEL_FIELD_NUMBER;
hash = (53 * hash) + accessLevel_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static ru.tinkoff.piapi.contract.v1.Account parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.Account parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ru.tinkoff.piapi.contract.v1.Account parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.Account parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ru.tinkoff.piapi.contract.v1.Account parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.Account parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ru.tinkoff.piapi.contract.v1.Account parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.Account 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 ru.tinkoff.piapi.contract.v1.Account parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.Account 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 ru.tinkoff.piapi.contract.v1.Account parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.Account 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(ru.tinkoff.piapi.contract.v1.Account 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;
}
/**
*
*Информация о счёте.
*
*
* Protobuf type {@code tinkoff.public.invest.api.contract.v1.Account}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tinkoff.public.invest.api.contract.v1.Account)
ru.tinkoff.piapi.contract.v1.AccountOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Users.internal_static_tinkoff_public_invest_api_contract_v1_Account_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ru.tinkoff.piapi.contract.v1.Users.internal_static_tinkoff_public_invest_api_contract_v1_Account_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.Account.class, ru.tinkoff.piapi.contract.v1.Account.Builder.class);
}
// Construct using ru.tinkoff.piapi.contract.v1.Account.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
type_ = 0;
name_ = "";
status_ = 0;
openedDate_ = null;
if (openedDateBuilder_ != null) {
openedDateBuilder_.dispose();
openedDateBuilder_ = null;
}
closedDate_ = null;
if (closedDateBuilder_ != null) {
closedDateBuilder_.dispose();
closedDateBuilder_ = null;
}
accessLevel_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ru.tinkoff.piapi.contract.v1.Users.internal_static_tinkoff_public_invest_api_contract_v1_Account_descriptor;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.Account getDefaultInstanceForType() {
return ru.tinkoff.piapi.contract.v1.Account.getDefaultInstance();
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.Account build() {
ru.tinkoff.piapi.contract.v1.Account result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.Account buildPartial() {
ru.tinkoff.piapi.contract.v1.Account result = new ru.tinkoff.piapi.contract.v1.Account(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(ru.tinkoff.piapi.contract.v1.Account result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.type_ = type_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.status_ = status_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.openedDate_ = openedDateBuilder_ == null
? openedDate_
: openedDateBuilder_.build();
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.closedDate_ = closedDateBuilder_ == null
? closedDate_
: closedDateBuilder_.build();
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.accessLevel_ = accessLevel_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ru.tinkoff.piapi.contract.v1.Account) {
return mergeFrom((ru.tinkoff.piapi.contract.v1.Account)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ru.tinkoff.piapi.contract.v1.Account other) {
if (other == ru.tinkoff.piapi.contract.v1.Account.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.status_ != 0) {
setStatusValue(other.getStatusValue());
}
if (other.hasOpenedDate()) {
mergeOpenedDate(other.getOpenedDate());
}
if (other.hasClosedDate()) {
mergeClosedDate(other.getClosedDate());
}
if (other.accessLevel_ != 0) {
setAccessLevelValue(other.getAccessLevelValue());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
type_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
status_ = input.readEnum();
bitField0_ |= 0x00000008;
break;
} // case 32
case 42: {
input.readMessage(
getOpenedDateFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50: {
input.readMessage(
getClosedDateFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 56: {
accessLevel_ = input.readEnum();
bitField0_ |= 0x00000040;
break;
} // case 56
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* Идентификатор счёта.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Идентификатор счёта.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Идентификатор счёта.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Идентификатор счёта.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Идентификатор счёта.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int type_ = 0;
/**
*
* Тип счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountType type = 2;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Тип счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountType type = 2;
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Тип счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountType type = 2;
* @return The type.
*/
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.AccountType getType() {
ru.tinkoff.piapi.contract.v1.AccountType result = ru.tinkoff.piapi.contract.v1.AccountType.forNumber(type_);
return result == null ? ru.tinkoff.piapi.contract.v1.AccountType.UNRECOGNIZED : result;
}
/**
*
* Тип счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountType type = 2;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(ru.tinkoff.piapi.contract.v1.AccountType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Тип счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountType type = 2;
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000002);
type_ = 0;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
* Название счёта.
*
*
* string name = 3;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Название счёта.
*
*
* string name = 3;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Название счёта.
*
*
* string name = 3;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Название счёта.
*
*
* string name = 3;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* Название счёта.
*
*
* string name = 3;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private int status_ = 0;
/**
*
* Статус счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountStatus status = 4;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Статус счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountStatus status = 4;
* @param value The enum numeric value on the wire for status to set.
* @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
status_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Статус счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountStatus status = 4;
* @return The status.
*/
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.AccountStatus getStatus() {
ru.tinkoff.piapi.contract.v1.AccountStatus result = ru.tinkoff.piapi.contract.v1.AccountStatus.forNumber(status_);
return result == null ? ru.tinkoff.piapi.contract.v1.AccountStatus.UNRECOGNIZED : result;
}
/**
*
* Статус счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountStatus status = 4;
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(ru.tinkoff.piapi.contract.v1.AccountStatus value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
status_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Статус счёта.
*
*
* .tinkoff.public.invest.api.contract.v1.AccountStatus status = 4;
* @return This builder for chaining.
*/
public Builder clearStatus() {
bitField0_ = (bitField0_ & ~0x00000008);
status_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Timestamp openedDate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> openedDateBuilder_;
/**
*
* Дата открытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp opened_date = 5;
* @return Whether the openedDate field is set.
*/
public boolean hasOpenedDate() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Дата открытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp opened_date = 5;
* @return The openedDate.
*/
public com.google.protobuf.Timestamp getOpenedDate() {
if (openedDateBuilder_ == null) {
return openedDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : openedDate_;
} else {
return openedDateBuilder_.getMessage();
}
}
/**
*
* Дата открытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp opened_date = 5;
*/
public Builder setOpenedDate(com.google.protobuf.Timestamp value) {
if (openedDateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
openedDate_ = value;
} else {
openedDateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Дата открытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp opened_date = 5;
*/
public Builder setOpenedDate(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (openedDateBuilder_ == null) {
openedDate_ = builderForValue.build();
} else {
openedDateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Дата открытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp opened_date = 5;
*/
public Builder mergeOpenedDate(com.google.protobuf.Timestamp value) {
if (openedDateBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
openedDate_ != null &&
openedDate_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getOpenedDateBuilder().mergeFrom(value);
} else {
openedDate_ = value;
}
} else {
openedDateBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Дата открытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp opened_date = 5;
*/
public Builder clearOpenedDate() {
bitField0_ = (bitField0_ & ~0x00000010);
openedDate_ = null;
if (openedDateBuilder_ != null) {
openedDateBuilder_.dispose();
openedDateBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Дата открытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp opened_date = 5;
*/
public com.google.protobuf.Timestamp.Builder getOpenedDateBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getOpenedDateFieldBuilder().getBuilder();
}
/**
*
* Дата открытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp opened_date = 5;
*/
public com.google.protobuf.TimestampOrBuilder getOpenedDateOrBuilder() {
if (openedDateBuilder_ != null) {
return openedDateBuilder_.getMessageOrBuilder();
} else {
return openedDate_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : openedDate_;
}
}
/**
*
* Дата открытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp opened_date = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getOpenedDateFieldBuilder() {
if (openedDateBuilder_ == null) {
openedDateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getOpenedDate(),
getParentForChildren(),
isClean());
openedDate_ = null;
}
return openedDateBuilder_;
}
private com.google.protobuf.Timestamp closedDate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> closedDateBuilder_;
/**
*
* Дата закрытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp closed_date = 6;
* @return Whether the closedDate field is set.
*/
public boolean hasClosedDate() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Дата закрытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp closed_date = 6;
* @return The closedDate.
*/
public com.google.protobuf.Timestamp getClosedDate() {
if (closedDateBuilder_ == null) {
return closedDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : closedDate_;
} else {
return closedDateBuilder_.getMessage();
}
}
/**
*
* Дата закрытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp closed_date = 6;
*/
public Builder setClosedDate(com.google.protobuf.Timestamp value) {
if (closedDateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
closedDate_ = value;
} else {
closedDateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Дата закрытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp closed_date = 6;
*/
public Builder setClosedDate(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (closedDateBuilder_ == null) {
closedDate_ = builderForValue.build();
} else {
closedDateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Дата закрытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp closed_date = 6;
*/
public Builder mergeClosedDate(com.google.protobuf.Timestamp value) {
if (closedDateBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
closedDate_ != null &&
closedDate_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getClosedDateBuilder().mergeFrom(value);
} else {
closedDate_ = value;
}
} else {
closedDateBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Дата закрытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp closed_date = 6;
*/
public Builder clearClosedDate() {
bitField0_ = (bitField0_ & ~0x00000020);
closedDate_ = null;
if (closedDateBuilder_ != null) {
closedDateBuilder_.dispose();
closedDateBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Дата закрытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp closed_date = 6;
*/
public com.google.protobuf.Timestamp.Builder getClosedDateBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getClosedDateFieldBuilder().getBuilder();
}
/**
*
* Дата закрытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp closed_date = 6;
*/
public com.google.protobuf.TimestampOrBuilder getClosedDateOrBuilder() {
if (closedDateBuilder_ != null) {
return closedDateBuilder_.getMessageOrBuilder();
} else {
return closedDate_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : closedDate_;
}
}
/**
*
* Дата закрытия счёта в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp closed_date = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getClosedDateFieldBuilder() {
if (closedDateBuilder_ == null) {
closedDateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getClosedDate(),
getParentForChildren(),
isClean());
closedDate_ = null;
}
return closedDateBuilder_;
}
private int accessLevel_ = 0;
/**
*
* Уровень доступа к текущему счёту (определяется токеном).
*
*
* .tinkoff.public.invest.api.contract.v1.AccessLevel access_level = 7;
* @return The enum numeric value on the wire for accessLevel.
*/
@java.lang.Override public int getAccessLevelValue() {
return accessLevel_;
}
/**
*
* Уровень доступа к текущему счёту (определяется токеном).
*
*
* .tinkoff.public.invest.api.contract.v1.AccessLevel access_level = 7;
* @param value The enum numeric value on the wire for accessLevel to set.
* @return This builder for chaining.
*/
public Builder setAccessLevelValue(int value) {
accessLevel_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Уровень доступа к текущему счёту (определяется токеном).
*
*
* .tinkoff.public.invest.api.contract.v1.AccessLevel access_level = 7;
* @return The accessLevel.
*/
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.AccessLevel getAccessLevel() {
ru.tinkoff.piapi.contract.v1.AccessLevel result = ru.tinkoff.piapi.contract.v1.AccessLevel.forNumber(accessLevel_);
return result == null ? ru.tinkoff.piapi.contract.v1.AccessLevel.UNRECOGNIZED : result;
}
/**
*
* Уровень доступа к текущему счёту (определяется токеном).
*
*
* .tinkoff.public.invest.api.contract.v1.AccessLevel access_level = 7;
* @param value The accessLevel to set.
* @return This builder for chaining.
*/
public Builder setAccessLevel(ru.tinkoff.piapi.contract.v1.AccessLevel value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000040;
accessLevel_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Уровень доступа к текущему счёту (определяется токеном).
*
*
* .tinkoff.public.invest.api.contract.v1.AccessLevel access_level = 7;
* @return This builder for chaining.
*/
public Builder clearAccessLevel() {
bitField0_ = (bitField0_ & ~0x00000040);
accessLevel_ = 0;
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:tinkoff.public.invest.api.contract.v1.Account)
}
// @@protoc_insertion_point(class_scope:tinkoff.public.invest.api.contract.v1.Account)
private static final ru.tinkoff.piapi.contract.v1.Account DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ru.tinkoff.piapi.contract.v1.Account();
}
public static ru.tinkoff.piapi.contract.v1.Account getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Account parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.Account getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy