diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/API.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/API.java
deleted file mode 100644
index f2ccf6b7b6..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/API.java
+++ /dev/null
@@ -1,752 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/subscription.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-/**
- * Protobuf type {@code wso2.discovery.subscription.API}
- */
-public final class API extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:wso2.discovery.subscription.API)
- APIOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use API.newBuilder() to construct.
- private API(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private API() {
- name_ = "";
- versions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new API();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private API(
- 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: {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- versions_ = new com.google.protobuf.LazyStringArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- versions_.add(s);
- break;
- }
- default: {
- if (!parseUnknownField(
- 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_ & 0x00000001) != 0)) {
- versions_ = versions_.getUnmodifiableView();
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.internal_static_wso2_discovery_subscription_API_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.internal_static_wso2_discovery_subscription_API_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.API.class, org.wso2.apk.enforcer.discovery.subscription.API.Builder.class);
- }
-
- public static final int NAME_FIELD_NUMBER = 1;
- private volatile java.lang.Object name_;
- /**
- * string name = 1;
- * @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 = 1;
- * @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 VERSIONS_FIELD_NUMBER = 2;
- private com.google.protobuf.LazyStringList versions_;
- /**
- * repeated string versions = 2;
- * @return A list containing the versions.
- */
- public com.google.protobuf.ProtocolStringList
- getVersionsList() {
- return versions_;
- }
- /**
- * repeated string versions = 2;
- * @return The count of versions.
- */
- public int getVersionsCount() {
- return versions_.size();
- }
- /**
- * repeated string versions = 2;
- * @param index The index of the element to return.
- * @return The versions at the given index.
- */
- public java.lang.String getVersions(int index) {
- return versions_.get(index);
- }
- /**
- * repeated string versions = 2;
- * @param index The index of the value to return.
- * @return The bytes of the versions at the given index.
- */
- public com.google.protobuf.ByteString
- getVersionsBytes(int index) {
- return versions_.getByteString(index);
- }
-
- 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 (!getNameBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
- }
- for (int i = 0; i < versions_.size(); i++) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, versions_.getRaw(i));
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getNameBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
- }
- {
- int dataSize = 0;
- for (int i = 0; i < versions_.size(); i++) {
- dataSize += computeStringSizeNoTag(versions_.getRaw(i));
- }
- size += dataSize;
- size += 1 * getVersionsList().size();
- }
- 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 org.wso2.apk.enforcer.discovery.subscription.API)) {
- return super.equals(obj);
- }
- org.wso2.apk.enforcer.discovery.subscription.API other = (org.wso2.apk.enforcer.discovery.subscription.API) obj;
-
- if (!getName()
- .equals(other.getName())) return false;
- if (!getVersionsList()
- .equals(other.getVersionsList())) 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) + NAME_FIELD_NUMBER;
- hash = (53 * hash) + getName().hashCode();
- if (getVersionsCount() > 0) {
- hash = (37 * hash) + VERSIONS_FIELD_NUMBER;
- hash = (53 * hash) + getVersionsList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.API parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.API parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.API parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.API parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.API parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.API parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.API parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.API 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 org.wso2.apk.enforcer.discovery.subscription.API parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.API 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 org.wso2.apk.enforcer.discovery.subscription.API parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.API 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(org.wso2.apk.enforcer.discovery.subscription.API 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 wso2.discovery.subscription.API}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:wso2.discovery.subscription.API)
- org.wso2.apk.enforcer.discovery.subscription.APIOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.internal_static_wso2_discovery_subscription_API_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.internal_static_wso2_discovery_subscription_API_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.API.class, org.wso2.apk.enforcer.discovery.subscription.API.Builder.class);
- }
-
- // Construct using org.wso2.apk.enforcer.discovery.subscription.API.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();
- name_ = "";
-
- versions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.internal_static_wso2_discovery_subscription_API_descriptor;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.API getDefaultInstanceForType() {
- return org.wso2.apk.enforcer.discovery.subscription.API.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.API build() {
- org.wso2.apk.enforcer.discovery.subscription.API result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.API buildPartial() {
- org.wso2.apk.enforcer.discovery.subscription.API result = new org.wso2.apk.enforcer.discovery.subscription.API(this);
- int from_bitField0_ = bitField0_;
- result.name_ = name_;
- if (((bitField0_ & 0x00000001) != 0)) {
- versions_ = versions_.getUnmodifiableView();
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.versions_ = versions_;
- 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 org.wso2.apk.enforcer.discovery.subscription.API) {
- return mergeFrom((org.wso2.apk.enforcer.discovery.subscription.API)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.wso2.apk.enforcer.discovery.subscription.API other) {
- if (other == org.wso2.apk.enforcer.discovery.subscription.API.getDefaultInstance()) return this;
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- onChanged();
- }
- if (!other.versions_.isEmpty()) {
- if (versions_.isEmpty()) {
- versions_ = other.versions_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureVersionsIsMutable();
- versions_.addAll(other.versions_);
- }
- onChanged();
- }
- 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 {
- org.wso2.apk.enforcer.discovery.subscription.API parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.wso2.apk.enforcer.discovery.subscription.API) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private java.lang.Object name_ = "";
- /**
- * string name = 1;
- * @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 = 1;
- * @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 = 1;
- * @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;
- onChanged();
- return this;
- }
- /**
- * string name = 1;
- * @return This builder for chaining.
- */
- public Builder clearName() {
-
- name_ = getDefaultInstance().getName();
- onChanged();
- return this;
- }
- /**
- * string name = 1;
- * @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;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.LazyStringList versions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- private void ensureVersionsIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- versions_ = new com.google.protobuf.LazyStringArrayList(versions_);
- bitField0_ |= 0x00000001;
- }
- }
- /**
- * repeated string versions = 2;
- * @return A list containing the versions.
- */
- public com.google.protobuf.ProtocolStringList
- getVersionsList() {
- return versions_.getUnmodifiableView();
- }
- /**
- * repeated string versions = 2;
- * @return The count of versions.
- */
- public int getVersionsCount() {
- return versions_.size();
- }
- /**
- * repeated string versions = 2;
- * @param index The index of the element to return.
- * @return The versions at the given index.
- */
- public java.lang.String getVersions(int index) {
- return versions_.get(index);
- }
- /**
- * repeated string versions = 2;
- * @param index The index of the value to return.
- * @return The bytes of the versions at the given index.
- */
- public com.google.protobuf.ByteString
- getVersionsBytes(int index) {
- return versions_.getByteString(index);
- }
- /**
- * repeated string versions = 2;
- * @param index The index to set the value at.
- * @param value The versions to set.
- * @return This builder for chaining.
- */
- public Builder setVersions(
- int index, java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureVersionsIsMutable();
- versions_.set(index, value);
- onChanged();
- return this;
- }
- /**
- * repeated string versions = 2;
- * @param value The versions to add.
- * @return This builder for chaining.
- */
- public Builder addVersions(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureVersionsIsMutable();
- versions_.add(value);
- onChanged();
- return this;
- }
- /**
- * repeated string versions = 2;
- * @param values The versions to add.
- * @return This builder for chaining.
- */
- public Builder addAllVersions(
- java.lang.Iterable values) {
- ensureVersionsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, versions_);
- onChanged();
- return this;
- }
- /**
- * repeated string versions = 2;
- * @return This builder for chaining.
- */
- public Builder clearVersions() {
- versions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- * repeated string versions = 2;
- * @param value The bytes of the versions to add.
- * @return This builder for chaining.
- */
- public Builder addVersionsBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- ensureVersionsIsMutable();
- versions_.add(value);
- 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:wso2.discovery.subscription.API)
- }
-
- // @@protoc_insertion_point(class_scope:wso2.discovery.subscription.API)
- private static final org.wso2.apk.enforcer.discovery.subscription.API DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.wso2.apk.enforcer.discovery.subscription.API();
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.API getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public API parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new API(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 org.wso2.apk.enforcer.discovery.subscription.API getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscribedAPIRef.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscribedAPIRef.java
deleted file mode 100644
index a42e9b007b..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscribedAPIRef.java
+++ /dev/null
@@ -1,752 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/subscription.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-/**
- * Protobuf type {@code wso2.discovery.subscription.SubscribedAPIRef}
- */
-public final class SubscribedAPIRef extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:wso2.discovery.subscription.SubscribedAPIRef)
- SubscribedAPIRefOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use SubscribedAPIRef.newBuilder() to construct.
- private SubscribedAPIRef(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private SubscribedAPIRef() {
- name_ = "";
- versions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new SubscribedAPIRef();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private SubscribedAPIRef(
- 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: {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- versions_ = new com.google.protobuf.LazyStringArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- versions_.add(s);
- break;
- }
- default: {
- if (!parseUnknownField(
- 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_ & 0x00000001) != 0)) {
- versions_ = versions_.getUnmodifiableView();
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.internal_static_wso2_discovery_subscription_SubscribedAPIRef_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.internal_static_wso2_discovery_subscription_SubscribedAPIRef_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef.class, org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef.Builder.class);
- }
-
- public static final int NAME_FIELD_NUMBER = 1;
- private volatile java.lang.Object name_;
- /**
- * string name = 1;
- * @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 = 1;
- * @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 VERSIONS_FIELD_NUMBER = 2;
- private com.google.protobuf.LazyStringList versions_;
- /**
- * repeated string versions = 2;
- * @return A list containing the versions.
- */
- public com.google.protobuf.ProtocolStringList
- getVersionsList() {
- return versions_;
- }
- /**
- * repeated string versions = 2;
- * @return The count of versions.
- */
- public int getVersionsCount() {
- return versions_.size();
- }
- /**
- * repeated string versions = 2;
- * @param index The index of the element to return.
- * @return The versions at the given index.
- */
- public java.lang.String getVersions(int index) {
- return versions_.get(index);
- }
- /**
- * repeated string versions = 2;
- * @param index The index of the value to return.
- * @return The bytes of the versions at the given index.
- */
- public com.google.protobuf.ByteString
- getVersionsBytes(int index) {
- return versions_.getByteString(index);
- }
-
- 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 (!getNameBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
- }
- for (int i = 0; i < versions_.size(); i++) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, versions_.getRaw(i));
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getNameBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
- }
- {
- int dataSize = 0;
- for (int i = 0; i < versions_.size(); i++) {
- dataSize += computeStringSizeNoTag(versions_.getRaw(i));
- }
- size += dataSize;
- size += 1 * getVersionsList().size();
- }
- 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 org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef)) {
- return super.equals(obj);
- }
- org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef other = (org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef) obj;
-
- if (!getName()
- .equals(other.getName())) return false;
- if (!getVersionsList()
- .equals(other.getVersionsList())) 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) + NAME_FIELD_NUMBER;
- hash = (53 * hash) + getName().hashCode();
- if (getVersionsCount() > 0) {
- hash = (37 * hash) + VERSIONS_FIELD_NUMBER;
- hash = (53 * hash) + getVersionsList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef 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 org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef 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 org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef 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(org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef 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 wso2.discovery.subscription.SubscribedAPIRef}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:wso2.discovery.subscription.SubscribedAPIRef)
- org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRefOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.internal_static_wso2_discovery_subscription_SubscribedAPIRef_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.internal_static_wso2_discovery_subscription_SubscribedAPIRef_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef.class, org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef.Builder.class);
- }
-
- // Construct using org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef.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();
- name_ = "";
-
- versions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.internal_static_wso2_discovery_subscription_SubscribedAPIRef_descriptor;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef getDefaultInstanceForType() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef build() {
- org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef buildPartial() {
- org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef result = new org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef(this);
- int from_bitField0_ = bitField0_;
- result.name_ = name_;
- if (((bitField0_ & 0x00000001) != 0)) {
- versions_ = versions_.getUnmodifiableView();
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.versions_ = versions_;
- 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 org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef) {
- return mergeFrom((org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef other) {
- if (other == org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef.getDefaultInstance()) return this;
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- onChanged();
- }
- if (!other.versions_.isEmpty()) {
- if (versions_.isEmpty()) {
- versions_ = other.versions_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureVersionsIsMutable();
- versions_.addAll(other.versions_);
- }
- onChanged();
- }
- 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 {
- org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private java.lang.Object name_ = "";
- /**
- * string name = 1;
- * @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 = 1;
- * @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 = 1;
- * @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;
- onChanged();
- return this;
- }
- /**
- * string name = 1;
- * @return This builder for chaining.
- */
- public Builder clearName() {
-
- name_ = getDefaultInstance().getName();
- onChanged();
- return this;
- }
- /**
- * string name = 1;
- * @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;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.LazyStringList versions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- private void ensureVersionsIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- versions_ = new com.google.protobuf.LazyStringArrayList(versions_);
- bitField0_ |= 0x00000001;
- }
- }
- /**
- * repeated string versions = 2;
- * @return A list containing the versions.
- */
- public com.google.protobuf.ProtocolStringList
- getVersionsList() {
- return versions_.getUnmodifiableView();
- }
- /**
- * repeated string versions = 2;
- * @return The count of versions.
- */
- public int getVersionsCount() {
- return versions_.size();
- }
- /**
- * repeated string versions = 2;
- * @param index The index of the element to return.
- * @return The versions at the given index.
- */
- public java.lang.String getVersions(int index) {
- return versions_.get(index);
- }
- /**
- * repeated string versions = 2;
- * @param index The index of the value to return.
- * @return The bytes of the versions at the given index.
- */
- public com.google.protobuf.ByteString
- getVersionsBytes(int index) {
- return versions_.getByteString(index);
- }
- /**
- * repeated string versions = 2;
- * @param index The index to set the value at.
- * @param value The versions to set.
- * @return This builder for chaining.
- */
- public Builder setVersions(
- int index, java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureVersionsIsMutable();
- versions_.set(index, value);
- onChanged();
- return this;
- }
- /**
- * repeated string versions = 2;
- * @param value The versions to add.
- * @return This builder for chaining.
- */
- public Builder addVersions(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureVersionsIsMutable();
- versions_.add(value);
- onChanged();
- return this;
- }
- /**
- * repeated string versions = 2;
- * @param values The versions to add.
- * @return This builder for chaining.
- */
- public Builder addAllVersions(
- java.lang.Iterable values) {
- ensureVersionsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, versions_);
- onChanged();
- return this;
- }
- /**
- * repeated string versions = 2;
- * @return This builder for chaining.
- */
- public Builder clearVersions() {
- versions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- * repeated string versions = 2;
- * @param value The bytes of the versions to add.
- * @return This builder for chaining.
- */
- public Builder addVersionsBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- ensureVersionsIsMutable();
- versions_.add(value);
- 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:wso2.discovery.subscription.SubscribedAPIRef)
- }
-
- // @@protoc_insertion_point(class_scope:wso2.discovery.subscription.SubscribedAPIRef)
- private static final org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef();
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public SubscribedAPIRef parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SubscribedAPIRef(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 org.wso2.apk.enforcer.discovery.subscription.SubscribedAPIRef getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscribedAPIRefOrBuilder.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscribedAPIRefOrBuilder.java
deleted file mode 100644
index 3adc957390..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscribedAPIRefOrBuilder.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/subscription.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public interface SubscribedAPIRefOrBuilder extends
- // @@protoc_insertion_point(interface_extends:wso2.discovery.subscription.SubscribedAPIRef)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * string name = 1;
- * @return The name.
- */
- java.lang.String getName();
- /**
- * string name = 1;
- * @return The bytes for name.
- */
- com.google.protobuf.ByteString
- getNameBytes();
-
- /**
- * repeated string versions = 2;
- * @return A list containing the versions.
- */
- java.util.List
- getVersionsList();
- /**
- * repeated string versions = 2;
- * @return The count of versions.
- */
- int getVersionsCount();
- /**
- * repeated string versions = 2;
- * @param index The index of the element to return.
- * @return The versions at the given index.
- */
- java.lang.String getVersions(int index);
- /**
- * repeated string versions = 2;
- * @param index The index of the value to return.
- * @return The bytes of the versions at the given index.
- */
- com.google.protobuf.ByteString
- getVersionsBytes(int index);
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/APIInfo.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/APIInfo.java
deleted file mode 100644
index ff99e8f58c..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/APIInfo.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
- *
- * WSO2 LLC. licenses this file to you under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.wso2.apk.enforcer.models;
-
-import java.util.List;
-
-/**
- * Model class for API Information
- */
-public class APIInfo {
- private Integer apiId = null;
- private String provider = null;
- private String name = null;
- private String version = null;
- private String context = null;
- private String tier = null;
- private String apiType = null;
- private boolean isDefaultVersion = false;
- private String apiUUID = null;
- private String lcState = null;
- private List subscriptions = null;
-
- public Integer getApiId() {
- return apiId;
- }
-
- public void setApiId(Integer apiId) {
- this.apiId = apiId;
- }
-
- public String getProvider() {
- return provider;
- }
-
- public void setProvider(String provider) {
- this.provider = provider;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getTier() {
- return tier;
- }
-
- public void setTier(String tier) {
- this.tier = tier;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public String getContext() {
- return context;
- }
-
- public void setContext(String context) {
- this.context = context;
- }
-
- public String getApiType() {
- return apiType;
- }
-
- public void setApiType(String apiType) {
- this.apiType = apiType;
- }
-
- public boolean isDefaultVersion() {
- return isDefaultVersion;
- }
-
- public void setDefaultVersion(boolean defaultVersion) {
- isDefaultVersion = defaultVersion;
- }
-
- public String getApiUUID() {
- return apiUUID;
- }
-
- public void setApiUUID(String apiUUID) {
- this.apiUUID = apiUUID;
- }
-
- public String getLcState() {
- return lcState;
- }
-
- public void setLcState(String lcState) {
- this.lcState = lcState;
- }
-
- public List getSubscriptions() {
- return subscriptions;
- }
-
- public void setSubscriptions(List subscriptions) {
- this.subscriptions = subscriptions;
- }
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/Application.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/Application.java
index 790e1c8602..030d301c2a 100644
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/Application.java
+++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/Application.java
@@ -53,6 +53,16 @@ public void setName(String name) {
this.name = name;
}
+ public String getOwner() {
+
+ return owner;
+ }
+
+ public void setOwner(String owner) {
+
+ this.owner = owner;
+ }
+
public Map getAttributes() {
return attributes;
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/ApplicationInfo.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/ApplicationInfo.java
deleted file mode 100644
index 1d7c3b45f5..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/ApplicationInfo.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
- *
- * WSO2 LLC. licenses this file to you under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.wso2.apk.enforcer.models;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Model class for Application Information
- */
-public class ApplicationInfo {
-
- private Integer id = null;
- private String uuid;
- private String name = null;
- private Integer subId = null;
- private String subName = null;
- private String policy = null;
- private String tokenType = null;
- private String tenantDomain = null;
- private List groupIds = new ArrayList<>();
- private String consumerKey = null;
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getUuid() {
- return uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public Integer getSubId() {
- return subId;
- }
-
- public void setSubId(Integer subId) {
- this.subId = subId;
- }
-
- public String getSubName() {
- return subName;
- }
-
- public void setSubName(String subName) {
- this.subName = subName;
- }
-
- public String getPolicy() {
- return policy;
- }
-
- public void setPolicy(String policy) {
- this.policy = policy;
- }
-
- public String getTokenType() {
- return tokenType;
- }
-
- public void setTokenType(String tokenType) {
- this.tokenType = tokenType;
- }
-
- public String getTenantDomain() {
- return tenantDomain;
- }
-
- public void setTenantDomain(String tenantDomain) {
- this.tenantDomain = tenantDomain;
- }
-
- public List getGroupIds() {
- return groupIds;
- }
-
- public void setGroupIds(List groupIds) {
- this.groupIds = groupIds;
- }
-
- public String getConsumerKey() {
- return consumerKey;
- }
-
- public void setConsumerKey(String consumerKey) {
- this.consumerKey = consumerKey;
- }
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/ApplicationInfoList.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/ApplicationMappingList.java
similarity index 73%
rename from gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/ApplicationInfoList.java
rename to gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/ApplicationMappingList.java
index 26554dd04f..e3abcd6fab 100644
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/ApplicationInfoList.java
+++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/ApplicationMappingList.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
+ * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
@@ -15,32 +15,37 @@
* specific language governing permissions and limitations
* under the License.
*/
+
package org.wso2.apk.enforcer.models;
import java.util.ArrayList;
import java.util.List;
/**
- * Model class for Application Information list
+ * Holds details about list of application and subscription mappings.
*/
-public class ApplicationInfoList {
+public class ApplicationMappingList {
private Integer count = null;
- private List list = new ArrayList<>();
+ private List list = new ArrayList<>();
public Integer getCount() {
+
return count;
}
public void setCount(Integer count) {
+
this.count = count;
}
- public List getList() {
+ public List getList() {
+
return list;
}
- public void setList(List list) {
+ public void setList(List list) {
+
this.list = list;
}
}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/SubscriptionInfo.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/SubscriptionInfo.java
deleted file mode 100644
index fead97b81b..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/models/SubscriptionInfo.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
- *
- * WSO2 LLC. licenses this file to you under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.wso2.apk.enforcer.models;
-
-import java.io.Serializable;
-
-/**
- * Model class for Subscription info
- */
-public class SubscriptionInfo implements Serializable {
-
- private String subscriptionId = null;
- private String policyId = null;
- private String apiUUID = null;
- private String appUUID = null;
- private String subscriptionState = null;
- private long timeStamp;
- private ApplicationInfo applicationInfo = null;
-
- public String getSubscriptionId() {
- return subscriptionId;
- }
-
- public void setSubscriptionId(String subscriptionId) {
- this.subscriptionId = subscriptionId;
- }
-
- public String getPolicyId() {
- return policyId;
- }
-
- public void setPolicyId(String policyId) {
- this.policyId = policyId;
- }
-
- public String getApiUUID() {
- return apiUUID;
- }
-
- public void setApiUUID(String apiUUID) {
- this.apiUUID = apiUUID;
- }
-
- public String getAppUUID() {
- return appUUID;
- }
-
- public void setAppUUID(String appUUID) {
- this.appUUID = appUUID;
- }
-
- public String getSubscriptionState() {
- return subscriptionState;
- }
-
- public void setSubscriptionState(String subscriptionState) {
- this.subscriptionState = subscriptionState;
- }
-
- public long getTimeStamp() {
- return timeStamp;
- }
-
- public void setTimeStamp(long timeStamp) {
- this.timeStamp = timeStamp;
- }
-
- public ApplicationInfo getApplicationInfo() {
- return applicationInfo;
- }
-
- public void setApplicationInfo(ApplicationInfo applicationInfo) {
- this.applicationInfo = applicationInfo;
- }
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/subscription/SubscriptionDataStoreImpl.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/subscription/SubscriptionDataStoreImpl.java
index 428d39d8af..ade299fa7d 100644
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/subscription/SubscriptionDataStoreImpl.java
+++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/subscription/SubscriptionDataStoreImpl.java
@@ -42,6 +42,7 @@
import org.wso2.apk.enforcer.models.ApplicationKeyMapping;
import org.wso2.apk.enforcer.models.ApplicationMapping;
import org.wso2.apk.enforcer.models.ApplicationPolicy;
+import org.wso2.apk.enforcer.models.SubscribedAPI;
import org.wso2.apk.enforcer.models.Subscription;
import org.wso2.apk.enforcer.models.SubscriptionPolicy;
import org.wso2.apk.enforcer.security.jwt.validator.JWTValidator;