Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: provenance/metadata/v1/scope.proto
package io.provenance.metadata.v1;
/**
*
*A Session is created for an execution context against a specific specification instance
*The context will have a specification and set of parties involved. The Session may be updated several
*times so long as the parties listed are signers on the transaction. NOTE: When there are no Records within a Scope
*that reference a Session it is removed.
*
*
* Protobuf type {@code provenance.metadata.v1.Session}
*/
public final class Session extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:provenance.metadata.v1.Session)
SessionOrBuilder {
private static final long serialVersionUID = 0L;
// Use Session.newBuilder() to construct.
private Session(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Session() {
sessionId_ = com.google.protobuf.ByteString.EMPTY;
specificationId_ = com.google.protobuf.ByteString.EMPTY;
parties_ = java.util.Collections.emptyList();
name_ = "";
context_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Session(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
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 10: {
sessionId_ = input.readBytes();
break;
}
case 18: {
specificationId_ = input.readBytes();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
parties_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
parties_.add(
input.readMessage(io.provenance.metadata.v1.Party.parser(), extensionRegistry));
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 42: {
context_ = input.readBytes();
break;
}
case 794: {
io.provenance.metadata.v1.AuditFields.Builder subBuilder = null;
if (audit_ != null) {
subBuilder = audit_.toBuilder();
}
audit_ = input.readMessage(io.provenance.metadata.v1.AuditFields.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(audit_);
audit_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
parties_ = java.util.Collections.unmodifiableList(parties_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.provenance.metadata.v1.ScopeOuterClass.internal_static_provenance_metadata_v1_Session_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.provenance.metadata.v1.ScopeOuterClass.internal_static_provenance_metadata_v1_Session_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.provenance.metadata.v1.Session.class, io.provenance.metadata.v1.Session.Builder.class);
}
private int bitField0_;
public static final int SESSION_ID_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString sessionId_;
/**
* bytes session_id = 1 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"session_id\""];
*/
public com.google.protobuf.ByteString getSessionId() {
return sessionId_;
}
public static final int SPECIFICATION_ID_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString specificationId_;
/**
*
* unique id of the contract specification that was used to create this session.
*
*
* bytes specification_id = 2 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"specification_id\""];
*/
public com.google.protobuf.ByteString getSpecificationId() {
return specificationId_;
}
public static final int PARTIES_FIELD_NUMBER = 3;
private java.util.List parties_;
/**
*
* parties is the set of identities that signed this contract
*
* Created by, updated by, timestamps, version number, and related info.
*
*
* .provenance.metadata.v1.AuditFields audit = 99 [(.gogoproto.moretags) = "yaml:\"audit,omitempty\""];
*/
public io.provenance.metadata.v1.AuditFieldsOrBuilder getAuditOrBuilder() {
return getAudit();
}
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 (!sessionId_.isEmpty()) {
output.writeBytes(1, sessionId_);
}
if (!specificationId_.isEmpty()) {
output.writeBytes(2, specificationId_);
}
for (int i = 0; i < parties_.size(); i++) {
output.writeMessage(3, parties_.get(i));
}
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_);
}
if (!context_.isEmpty()) {
output.writeBytes(5, context_);
}
if (audit_ != null) {
output.writeMessage(99, getAudit());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!sessionId_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, sessionId_);
}
if (!specificationId_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, specificationId_);
}
for (int i = 0; i < parties_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, parties_.get(i));
}
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_);
}
if (!context_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(5, context_);
}
if (audit_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(99, getAudit());
}
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 io.provenance.metadata.v1.Session)) {
return super.equals(obj);
}
io.provenance.metadata.v1.Session other = (io.provenance.metadata.v1.Session) obj;
boolean result = true;
result = result && getSessionId()
.equals(other.getSessionId());
result = result && getSpecificationId()
.equals(other.getSpecificationId());
result = result && getPartiesList()
.equals(other.getPartiesList());
result = result && getName()
.equals(other.getName());
result = result && getContext()
.equals(other.getContext());
result = result && (hasAudit() == other.hasAudit());
if (hasAudit()) {
result = result && getAudit()
.equals(other.getAudit());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SESSION_ID_FIELD_NUMBER;
hash = (53 * hash) + getSessionId().hashCode();
hash = (37 * hash) + SPECIFICATION_ID_FIELD_NUMBER;
hash = (53 * hash) + getSpecificationId().hashCode();
if (getPartiesCount() > 0) {
hash = (37 * hash) + PARTIES_FIELD_NUMBER;
hash = (53 * hash) + getPartiesList().hashCode();
}
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + getContext().hashCode();
if (hasAudit()) {
hash = (37 * hash) + AUDIT_FIELD_NUMBER;
hash = (53 * hash) + getAudit().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.provenance.metadata.v1.Session parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.provenance.metadata.v1.Session parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.provenance.metadata.v1.Session parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.provenance.metadata.v1.Session parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.provenance.metadata.v1.Session parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.provenance.metadata.v1.Session parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.provenance.metadata.v1.Session parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.provenance.metadata.v1.Session 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 io.provenance.metadata.v1.Session parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.provenance.metadata.v1.Session 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 io.provenance.metadata.v1.Session parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.provenance.metadata.v1.Session 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(io.provenance.metadata.v1.Session 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;
}
/**
*
*A Session is created for an execution context against a specific specification instance
*The context will have a specification and set of parties involved. The Session may be updated several
*times so long as the parties listed are signers on the transaction. NOTE: When there are no Records within a Scope
*that reference a Session it is removed.
*