- getListList();
- /**
- * repeated .wso2.discovery.subscription.ApplicationPolicy list = 2;
- */
- org.wso2.apk.enforcer.discovery.subscription.ApplicationPolicy getList(int index);
- /**
- * repeated .wso2.discovery.subscription.ApplicationPolicy list = 2;
- */
- int getListCount();
- /**
- * repeated .wso2.discovery.subscription.ApplicationPolicy list = 2;
- */
- java.util.List extends org.wso2.apk.enforcer.discovery.subscription.ApplicationPolicyOrBuilder>
- getListOrBuilderList();
- /**
- * repeated .wso2.discovery.subscription.ApplicationPolicy list = 2;
- */
- org.wso2.apk.enforcer.discovery.subscription.ApplicationPolicyOrBuilder getListOrBuilder(
- int index);
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationPolicyListProto.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationPolicyListProto.java
deleted file mode 100644
index 57539daa87..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationPolicyListProto.java
+++ /dev/null
@@ -1,57 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/application_policy_list.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public final class ApplicationPolicyListProto {
- private ApplicationPolicyListProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_wso2_discovery_subscription_ApplicationPolicyList_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_wso2_discovery_subscription_ApplicationPolicyList_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n9wso2/discovery/subscription/applicatio" +
- "n_policy_list.proto\022\033wso2.discovery.subs" +
- "cription\0324wso2/discovery/subscription/ap" +
- "plication_policy.proto\"U\n\025ApplicationPol" +
- "icyList\022<\n\004list\030\002 \003(\0132..wso2.discovery.s" +
- "ubscription.ApplicationPolicyB\235\001\n,org.ws" +
- "o2.apk.enforcer.discovery.subscriptionB\032" +
- "ApplicationPolicyListProtoP\001ZOgithub.com" +
- "/envoyproxy/go-control-plane/wso2/discov" +
- "ery/subscription;subscriptionb\006proto3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- org.wso2.apk.enforcer.discovery.subscription.ApplicationPolicyProto.getDescriptor(),
- });
- internal_static_wso2_discovery_subscription_ApplicationPolicyList_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_wso2_discovery_subscription_ApplicationPolicyList_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_wso2_discovery_subscription_ApplicationPolicyList_descriptor,
- new java.lang.String[] { "List", });
- org.wso2.apk.enforcer.discovery.subscription.ApplicationPolicyProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationPolicyOrBuilder.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationPolicyOrBuilder.java
deleted file mode 100644
index f8f865692b..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationPolicyOrBuilder.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/application_policy.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public interface ApplicationPolicyOrBuilder extends
- // @@protoc_insertion_point(interface_extends:wso2.discovery.subscription.ApplicationPolicy)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * int32 id = 1;
- * @return The id.
- */
- int getId();
-
- /**
- * int32 tenantId = 2;
- * @return The tenantId.
- */
- int getTenantId();
-
- /**
- * string name = 3;
- * @return The name.
- */
- java.lang.String getName();
- /**
- * string name = 3;
- * @return The bytes for name.
- */
- com.google.protobuf.ByteString
- getNameBytes();
-
- /**
- * string quotaType = 4;
- * @return The quotaType.
- */
- java.lang.String getQuotaType();
- /**
- * string quotaType = 4;
- * @return The bytes for quotaType.
- */
- com.google.protobuf.ByteString
- getQuotaTypeBytes();
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationPolicyProto.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationPolicyProto.java
deleted file mode 100644
index 9d7e5df091..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationPolicyProto.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/application_policy.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public final class ApplicationPolicyProto {
- private ApplicationPolicyProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_wso2_discovery_subscription_ApplicationPolicy_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_wso2_discovery_subscription_ApplicationPolicy_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n4wso2/discovery/subscription/applicatio" +
- "n_policy.proto\022\033wso2.discovery.subscript" +
- "ion\"R\n\021ApplicationPolicy\022\n\n\002id\030\001 \001(\005\022\020\n\010" +
- "tenantId\030\002 \001(\005\022\014\n\004name\030\003 \001(\t\022\021\n\tquotaTyp" +
- "e\030\004 \001(\tB\231\001\n,org.wso2.apk.enforcer.discov" +
- "ery.subscriptionB\026ApplicationPolicyProto" +
- "P\001ZOgithub.com/envoyproxy/go-control-pla" +
- "ne/wso2/discovery/subscription;subscript" +
- "ionb\006proto3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- });
- internal_static_wso2_discovery_subscription_ApplicationPolicy_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_wso2_discovery_subscription_ApplicationPolicy_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_wso2_discovery_subscription_ApplicationPolicy_descriptor,
- new java.lang.String[] { "Id", "TenantId", "Name", "QuotaType", });
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/AuthenticationOptionOrBuilder.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/AuthenticationOptionOrBuilder.java
deleted file mode 100644
index 4e8065e1c8..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/AuthenticationOptionOrBuilder.java
+++ /dev/null
@@ -1,57 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/application.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public interface AuthenticationOptionOrBuilder extends
- // @@protoc_insertion_point(interface_extends:wso2.discovery.subscription.AuthenticationOption)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * string type = 1;
- * @return The type.
- */
- java.lang.String getType();
- /**
- * string type = 1;
- * @return The bytes for type.
- */
- com.google.protobuf.ByteString
- getTypeBytes();
-
- /**
- *
- * MTLS mTLS = 3;
- * BasicAuth basicAuth = 4;
- * APIKey apiKey = 5;
- * IPRange IPRange = 6;
- *
- *
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 2;
- * @return Whether the oAuth2 field is set.
- */
- boolean hasOAuth2();
- /**
- *
- * MTLS mTLS = 3;
- * BasicAuth basicAuth = 4;
- * APIKey apiKey = 5;
- * IPRange IPRange = 6;
- *
- *
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 2;
- * @return The oAuth2.
- */
- org.wso2.apk.enforcer.discovery.subscription.OAuth2 getOAuth2();
- /**
- *
- * MTLS mTLS = 3;
- * BasicAuth basicAuth = 4;
- * APIKey apiKey = 5;
- * IPRange IPRange = 6;
- *
- *
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 2;
- */
- org.wso2.apk.enforcer.discovery.subscription.OAuth2OrBuilder getOAuth2OrBuilder();
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/Environment.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/Environment.java
deleted file mode 100644
index d2774073f1..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/Environment.java
+++ /dev/null
@@ -1,833 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/application.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-/**
- * Protobuf type {@code wso2.discovery.subscription.Environment}
- */
-public final class Environment extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:wso2.discovery.subscription.Environment)
- EnvironmentOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use Environment.newBuilder() to construct.
- private Environment(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Environment() {
- envID_ = "";
- applicationIdentifier_ = "";
- keyType_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new Environment();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Environment(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- envID_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- applicationIdentifier_ = s;
- break;
- }
- case 26: {
- java.lang.String s = input.readStringRequireUtf8();
-
- keyType_ = 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 {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_Environment_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_Environment_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.Environment.class, org.wso2.apk.enforcer.discovery.subscription.Environment.Builder.class);
- }
-
- public static final int ENVID_FIELD_NUMBER = 1;
- private volatile java.lang.Object envID_;
- /**
- * string envID = 1;
- * @return The envID.
- */
- @java.lang.Override
- public java.lang.String getEnvID() {
- java.lang.Object ref = envID_;
- 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();
- envID_ = s;
- return s;
- }
- }
- /**
- * string envID = 1;
- * @return The bytes for envID.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getEnvIDBytes() {
- java.lang.Object ref = envID_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- envID_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int APPLICATIONIDENTIFIER_FIELD_NUMBER = 2;
- private volatile java.lang.Object applicationIdentifier_;
- /**
- * string applicationIdentifier = 2;
- * @return The applicationIdentifier.
- */
- @java.lang.Override
- public java.lang.String getApplicationIdentifier() {
- java.lang.Object ref = applicationIdentifier_;
- 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();
- applicationIdentifier_ = s;
- return s;
- }
- }
- /**
- * string applicationIdentifier = 2;
- * @return The bytes for applicationIdentifier.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getApplicationIdentifierBytes() {
- java.lang.Object ref = applicationIdentifier_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- applicationIdentifier_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int KEYTYPE_FIELD_NUMBER = 3;
- private volatile java.lang.Object keyType_;
- /**
- * string keyType = 3;
- * @return The keyType.
- */
- @java.lang.Override
- public java.lang.String getKeyType() {
- java.lang.Object ref = keyType_;
- 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();
- keyType_ = s;
- return s;
- }
- }
- /**
- * string keyType = 3;
- * @return The bytes for keyType.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getKeyTypeBytes() {
- java.lang.Object ref = keyType_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- keyType_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- 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 (!getEnvIDBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, envID_);
- }
- if (!getApplicationIdentifierBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, applicationIdentifier_);
- }
- if (!getKeyTypeBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, keyType_);
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getEnvIDBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, envID_);
- }
- if (!getApplicationIdentifierBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, applicationIdentifier_);
- }
- if (!getKeyTypeBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, keyType_);
- }
- 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.Environment)) {
- return super.equals(obj);
- }
- org.wso2.apk.enforcer.discovery.subscription.Environment other = (org.wso2.apk.enforcer.discovery.subscription.Environment) obj;
-
- if (!getEnvID()
- .equals(other.getEnvID())) return false;
- if (!getApplicationIdentifier()
- .equals(other.getApplicationIdentifier())) return false;
- if (!getKeyType()
- .equals(other.getKeyType())) 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) + ENVID_FIELD_NUMBER;
- hash = (53 * hash) + getEnvID().hashCode();
- hash = (37 * hash) + APPLICATIONIDENTIFIER_FIELD_NUMBER;
- hash = (53 * hash) + getApplicationIdentifier().hashCode();
- hash = (37 * hash) + KEYTYPE_FIELD_NUMBER;
- hash = (53 * hash) + getKeyType().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.Environment parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.Environment 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.Environment parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.Environment 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.Environment parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.Environment 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.Environment 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.Environment 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.Environment 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.Environment 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.Environment 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.Environment 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.Environment 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.Environment}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:wso2.discovery.subscription.Environment)
- org.wso2.apk.enforcer.discovery.subscription.EnvironmentOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_Environment_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_Environment_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.Environment.class, org.wso2.apk.enforcer.discovery.subscription.Environment.Builder.class);
- }
-
- // Construct using org.wso2.apk.enforcer.discovery.subscription.Environment.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();
- envID_ = "";
-
- applicationIdentifier_ = "";
-
- keyType_ = "";
-
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_Environment_descriptor;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.Environment getDefaultInstanceForType() {
- return org.wso2.apk.enforcer.discovery.subscription.Environment.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.Environment build() {
- org.wso2.apk.enforcer.discovery.subscription.Environment result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.Environment buildPartial() {
- org.wso2.apk.enforcer.discovery.subscription.Environment result = new org.wso2.apk.enforcer.discovery.subscription.Environment(this);
- result.envID_ = envID_;
- result.applicationIdentifier_ = applicationIdentifier_;
- result.keyType_ = keyType_;
- 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.Environment) {
- return mergeFrom((org.wso2.apk.enforcer.discovery.subscription.Environment)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.wso2.apk.enforcer.discovery.subscription.Environment other) {
- if (other == org.wso2.apk.enforcer.discovery.subscription.Environment.getDefaultInstance()) return this;
- if (!other.getEnvID().isEmpty()) {
- envID_ = other.envID_;
- onChanged();
- }
- if (!other.getApplicationIdentifier().isEmpty()) {
- applicationIdentifier_ = other.applicationIdentifier_;
- onChanged();
- }
- if (!other.getKeyType().isEmpty()) {
- keyType_ = other.keyType_;
- 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.Environment parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.wso2.apk.enforcer.discovery.subscription.Environment) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object envID_ = "";
- /**
- * string envID = 1;
- * @return The envID.
- */
- public java.lang.String getEnvID() {
- java.lang.Object ref = envID_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- envID_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * string envID = 1;
- * @return The bytes for envID.
- */
- public com.google.protobuf.ByteString
- getEnvIDBytes() {
- java.lang.Object ref = envID_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- envID_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * string envID = 1;
- * @param value The envID to set.
- * @return This builder for chaining.
- */
- public Builder setEnvID(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- envID_ = value;
- onChanged();
- return this;
- }
- /**
- * string envID = 1;
- * @return This builder for chaining.
- */
- public Builder clearEnvID() {
-
- envID_ = getDefaultInstance().getEnvID();
- onChanged();
- return this;
- }
- /**
- * string envID = 1;
- * @param value The bytes for envID to set.
- * @return This builder for chaining.
- */
- public Builder setEnvIDBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- envID_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object applicationIdentifier_ = "";
- /**
- * string applicationIdentifier = 2;
- * @return The applicationIdentifier.
- */
- public java.lang.String getApplicationIdentifier() {
- java.lang.Object ref = applicationIdentifier_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- applicationIdentifier_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * string applicationIdentifier = 2;
- * @return The bytes for applicationIdentifier.
- */
- public com.google.protobuf.ByteString
- getApplicationIdentifierBytes() {
- java.lang.Object ref = applicationIdentifier_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- applicationIdentifier_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * string applicationIdentifier = 2;
- * @param value The applicationIdentifier to set.
- * @return This builder for chaining.
- */
- public Builder setApplicationIdentifier(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- applicationIdentifier_ = value;
- onChanged();
- return this;
- }
- /**
- * string applicationIdentifier = 2;
- * @return This builder for chaining.
- */
- public Builder clearApplicationIdentifier() {
-
- applicationIdentifier_ = getDefaultInstance().getApplicationIdentifier();
- onChanged();
- return this;
- }
- /**
- * string applicationIdentifier = 2;
- * @param value The bytes for applicationIdentifier to set.
- * @return This builder for chaining.
- */
- public Builder setApplicationIdentifierBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- applicationIdentifier_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object keyType_ = "";
- /**
- * string keyType = 3;
- * @return The keyType.
- */
- public java.lang.String getKeyType() {
- java.lang.Object ref = keyType_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- keyType_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * string keyType = 3;
- * @return The bytes for keyType.
- */
- public com.google.protobuf.ByteString
- getKeyTypeBytes() {
- java.lang.Object ref = keyType_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- keyType_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * string keyType = 3;
- * @param value The keyType to set.
- * @return This builder for chaining.
- */
- public Builder setKeyType(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- keyType_ = value;
- onChanged();
- return this;
- }
- /**
- * string keyType = 3;
- * @return This builder for chaining.
- */
- public Builder clearKeyType() {
-
- keyType_ = getDefaultInstance().getKeyType();
- onChanged();
- return this;
- }
- /**
- * string keyType = 3;
- * @param value The bytes for keyType to set.
- * @return This builder for chaining.
- */
- public Builder setKeyTypeBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- keyType_ = 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.Environment)
- }
-
- // @@protoc_insertion_point(class_scope:wso2.discovery.subscription.Environment)
- private static final org.wso2.apk.enforcer.discovery.subscription.Environment DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.wso2.apk.enforcer.discovery.subscription.Environment();
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.Environment getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Environment parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Environment(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.Environment getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/EnvironmentOrBuilder.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/EnvironmentOrBuilder.java
deleted file mode 100644
index 97f621f507..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/EnvironmentOrBuilder.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/application.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public interface EnvironmentOrBuilder extends
- // @@protoc_insertion_point(interface_extends:wso2.discovery.subscription.Environment)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * string envID = 1;
- * @return The envID.
- */
- java.lang.String getEnvID();
- /**
- * string envID = 1;
- * @return The bytes for envID.
- */
- com.google.protobuf.ByteString
- getEnvIDBytes();
-
- /**
- * string applicationIdentifier = 2;
- * @return The applicationIdentifier.
- */
- java.lang.String getApplicationIdentifier();
- /**
- * string applicationIdentifier = 2;
- * @return The bytes for applicationIdentifier.
- */
- com.google.protobuf.ByteString
- getApplicationIdentifierBytes();
-
- /**
- * string keyType = 3;
- * @return The keyType.
- */
- java.lang.String getKeyType();
- /**
- * string keyType = 3;
- * @return The bytes for keyType.
- */
- com.google.protobuf.ByteString
- getKeyTypeBytes();
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/OAuth2.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/OAuth2.java
deleted file mode 100644
index 5e40ba2b26..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/OAuth2.java
+++ /dev/null
@@ -1,770 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/application.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-/**
- * Protobuf type {@code wso2.discovery.subscription.OAuth2}
- */
-public final class OAuth2 extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:wso2.discovery.subscription.OAuth2)
- OAuth2OrBuilder {
-private static final long serialVersionUID = 0L;
- // Use OAuth2.newBuilder() to construct.
- private OAuth2(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private OAuth2() {
- environments_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new OAuth2();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private OAuth2(
- 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: {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- environments_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- environments_.add(
- input.readMessage(org.wso2.apk.enforcer.discovery.subscription.Environment.parser(), extensionRegistry));
- 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)) {
- environments_ = java.util.Collections.unmodifiableList(environments_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_OAuth2_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_OAuth2_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.OAuth2.class, org.wso2.apk.enforcer.discovery.subscription.OAuth2.Builder.class);
- }
-
- public static final int ENVIRONMENTS_FIELD_NUMBER = 1;
- private java.util.List environments_;
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- @java.lang.Override
- public java.util.List getEnvironmentsList() {
- return environments_;
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- @java.lang.Override
- public java.util.List extends org.wso2.apk.enforcer.discovery.subscription.EnvironmentOrBuilder>
- getEnvironmentsOrBuilderList() {
- return environments_;
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- @java.lang.Override
- public int getEnvironmentsCount() {
- return environments_.size();
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.Environment getEnvironments(int index) {
- return environments_.get(index);
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.EnvironmentOrBuilder getEnvironmentsOrBuilder(
- int index) {
- return environments_.get(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 {
- for (int i = 0; i < environments_.size(); i++) {
- output.writeMessage(1, environments_.get(i));
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- for (int i = 0; i < environments_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, environments_.get(i));
- }
- 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.OAuth2)) {
- return super.equals(obj);
- }
- org.wso2.apk.enforcer.discovery.subscription.OAuth2 other = (org.wso2.apk.enforcer.discovery.subscription.OAuth2) obj;
-
- if (!getEnvironmentsList()
- .equals(other.getEnvironmentsList())) 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();
- if (getEnvironmentsCount() > 0) {
- hash = (37 * hash) + ENVIRONMENTS_FIELD_NUMBER;
- hash = (53 * hash) + getEnvironmentsList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.OAuth2 parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.OAuth2 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.OAuth2 parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.OAuth2 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.OAuth2 parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.OAuth2 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.OAuth2 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.OAuth2 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.OAuth2 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.OAuth2 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.OAuth2 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.OAuth2 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.OAuth2 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.OAuth2}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:wso2.discovery.subscription.OAuth2)
- org.wso2.apk.enforcer.discovery.subscription.OAuth2OrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_OAuth2_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_OAuth2_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.OAuth2.class, org.wso2.apk.enforcer.discovery.subscription.OAuth2.Builder.class);
- }
-
- // Construct using org.wso2.apk.enforcer.discovery.subscription.OAuth2.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getEnvironmentsFieldBuilder();
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- if (environmentsBuilder_ == null) {
- environments_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- environmentsBuilder_.clear();
- }
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_OAuth2_descriptor;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.OAuth2 getDefaultInstanceForType() {
- return org.wso2.apk.enforcer.discovery.subscription.OAuth2.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.OAuth2 build() {
- org.wso2.apk.enforcer.discovery.subscription.OAuth2 result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.OAuth2 buildPartial() {
- org.wso2.apk.enforcer.discovery.subscription.OAuth2 result = new org.wso2.apk.enforcer.discovery.subscription.OAuth2(this);
- int from_bitField0_ = bitField0_;
- if (environmentsBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
- environments_ = java.util.Collections.unmodifiableList(environments_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.environments_ = environments_;
- } else {
- result.environments_ = environmentsBuilder_.build();
- }
- 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.OAuth2) {
- return mergeFrom((org.wso2.apk.enforcer.discovery.subscription.OAuth2)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.wso2.apk.enforcer.discovery.subscription.OAuth2 other) {
- if (other == org.wso2.apk.enforcer.discovery.subscription.OAuth2.getDefaultInstance()) return this;
- if (environmentsBuilder_ == null) {
- if (!other.environments_.isEmpty()) {
- if (environments_.isEmpty()) {
- environments_ = other.environments_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureEnvironmentsIsMutable();
- environments_.addAll(other.environments_);
- }
- onChanged();
- }
- } else {
- if (!other.environments_.isEmpty()) {
- if (environmentsBuilder_.isEmpty()) {
- environmentsBuilder_.dispose();
- environmentsBuilder_ = null;
- environments_ = other.environments_;
- bitField0_ = (bitField0_ & ~0x00000001);
- environmentsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getEnvironmentsFieldBuilder() : null;
- } else {
- environmentsBuilder_.addAllMessages(other.environments_);
- }
- }
- }
- 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.OAuth2 parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.wso2.apk.enforcer.discovery.subscription.OAuth2) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private java.util.List environments_ =
- java.util.Collections.emptyList();
- private void ensureEnvironmentsIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- environments_ = new java.util.ArrayList(environments_);
- bitField0_ |= 0x00000001;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- org.wso2.apk.enforcer.discovery.subscription.Environment, org.wso2.apk.enforcer.discovery.subscription.Environment.Builder, org.wso2.apk.enforcer.discovery.subscription.EnvironmentOrBuilder> environmentsBuilder_;
-
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public java.util.List getEnvironmentsList() {
- if (environmentsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(environments_);
- } else {
- return environmentsBuilder_.getMessageList();
- }
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public int getEnvironmentsCount() {
- if (environmentsBuilder_ == null) {
- return environments_.size();
- } else {
- return environmentsBuilder_.getCount();
- }
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public org.wso2.apk.enforcer.discovery.subscription.Environment getEnvironments(int index) {
- if (environmentsBuilder_ == null) {
- return environments_.get(index);
- } else {
- return environmentsBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public Builder setEnvironments(
- int index, org.wso2.apk.enforcer.discovery.subscription.Environment value) {
- if (environmentsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureEnvironmentsIsMutable();
- environments_.set(index, value);
- onChanged();
- } else {
- environmentsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public Builder setEnvironments(
- int index, org.wso2.apk.enforcer.discovery.subscription.Environment.Builder builderForValue) {
- if (environmentsBuilder_ == null) {
- ensureEnvironmentsIsMutable();
- environments_.set(index, builderForValue.build());
- onChanged();
- } else {
- environmentsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public Builder addEnvironments(org.wso2.apk.enforcer.discovery.subscription.Environment value) {
- if (environmentsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureEnvironmentsIsMutable();
- environments_.add(value);
- onChanged();
- } else {
- environmentsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public Builder addEnvironments(
- int index, org.wso2.apk.enforcer.discovery.subscription.Environment value) {
- if (environmentsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureEnvironmentsIsMutable();
- environments_.add(index, value);
- onChanged();
- } else {
- environmentsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public Builder addEnvironments(
- org.wso2.apk.enforcer.discovery.subscription.Environment.Builder builderForValue) {
- if (environmentsBuilder_ == null) {
- ensureEnvironmentsIsMutable();
- environments_.add(builderForValue.build());
- onChanged();
- } else {
- environmentsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public Builder addEnvironments(
- int index, org.wso2.apk.enforcer.discovery.subscription.Environment.Builder builderForValue) {
- if (environmentsBuilder_ == null) {
- ensureEnvironmentsIsMutable();
- environments_.add(index, builderForValue.build());
- onChanged();
- } else {
- environmentsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public Builder addAllEnvironments(
- java.lang.Iterable extends org.wso2.apk.enforcer.discovery.subscription.Environment> values) {
- if (environmentsBuilder_ == null) {
- ensureEnvironmentsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, environments_);
- onChanged();
- } else {
- environmentsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public Builder clearEnvironments() {
- if (environmentsBuilder_ == null) {
- environments_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- environmentsBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public Builder removeEnvironments(int index) {
- if (environmentsBuilder_ == null) {
- ensureEnvironmentsIsMutable();
- environments_.remove(index);
- onChanged();
- } else {
- environmentsBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public org.wso2.apk.enforcer.discovery.subscription.Environment.Builder getEnvironmentsBuilder(
- int index) {
- return getEnvironmentsFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public org.wso2.apk.enforcer.discovery.subscription.EnvironmentOrBuilder getEnvironmentsOrBuilder(
- int index) {
- if (environmentsBuilder_ == null) {
- return environments_.get(index); } else {
- return environmentsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public java.util.List extends org.wso2.apk.enforcer.discovery.subscription.EnvironmentOrBuilder>
- getEnvironmentsOrBuilderList() {
- if (environmentsBuilder_ != null) {
- return environmentsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(environments_);
- }
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public org.wso2.apk.enforcer.discovery.subscription.Environment.Builder addEnvironmentsBuilder() {
- return getEnvironmentsFieldBuilder().addBuilder(
- org.wso2.apk.enforcer.discovery.subscription.Environment.getDefaultInstance());
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public org.wso2.apk.enforcer.discovery.subscription.Environment.Builder addEnvironmentsBuilder(
- int index) {
- return getEnvironmentsFieldBuilder().addBuilder(
- index, org.wso2.apk.enforcer.discovery.subscription.Environment.getDefaultInstance());
- }
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- public java.util.List
- getEnvironmentsBuilderList() {
- return getEnvironmentsFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- org.wso2.apk.enforcer.discovery.subscription.Environment, org.wso2.apk.enforcer.discovery.subscription.Environment.Builder, org.wso2.apk.enforcer.discovery.subscription.EnvironmentOrBuilder>
- getEnvironmentsFieldBuilder() {
- if (environmentsBuilder_ == null) {
- environmentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- org.wso2.apk.enforcer.discovery.subscription.Environment, org.wso2.apk.enforcer.discovery.subscription.Environment.Builder, org.wso2.apk.enforcer.discovery.subscription.EnvironmentOrBuilder>(
- environments_,
- ((bitField0_ & 0x00000001) != 0),
- getParentForChildren(),
- isClean());
- environments_ = null;
- }
- return environmentsBuilder_;
- }
- @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.OAuth2)
- }
-
- // @@protoc_insertion_point(class_scope:wso2.discovery.subscription.OAuth2)
- private static final org.wso2.apk.enforcer.discovery.subscription.OAuth2 DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.wso2.apk.enforcer.discovery.subscription.OAuth2();
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.OAuth2 getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public OAuth2 parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new OAuth2(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.OAuth2 getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/OAuth2OrBuilder.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/OAuth2OrBuilder.java
deleted file mode 100644
index 186f562e2b..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/OAuth2OrBuilder.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/application.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public interface OAuth2OrBuilder extends
- // @@protoc_insertion_point(interface_extends:wso2.discovery.subscription.OAuth2)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- java.util.List
- getEnvironmentsList();
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- org.wso2.apk.enforcer.discovery.subscription.Environment getEnvironments(int index);
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- int getEnvironmentsCount();
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- java.util.List extends org.wso2.apk.enforcer.discovery.subscription.EnvironmentOrBuilder>
- getEnvironmentsOrBuilderList();
- /**
- * repeated .wso2.discovery.subscription.Environment environments = 1;
- */
- org.wso2.apk.enforcer.discovery.subscription.EnvironmentOrBuilder getEnvironmentsOrBuilder(
- int index);
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SecuritySchemes.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SecuritySchemes.java
deleted file mode 100644
index 6653eb815a..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SecuritySchemes.java
+++ /dev/null
@@ -1,607 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/application.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-/**
- * Protobuf type {@code wso2.discovery.subscription.SecuritySchemes}
- */
-public final class SecuritySchemes extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:wso2.discovery.subscription.SecuritySchemes)
- SecuritySchemesOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use SecuritySchemes.newBuilder() to construct.
- private SecuritySchemes(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private SecuritySchemes() {
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new SecuritySchemes();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private SecuritySchemes(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- org.wso2.apk.enforcer.discovery.subscription.OAuth2.Builder subBuilder = null;
- if (oAuth2_ != null) {
- subBuilder = oAuth2_.toBuilder();
- }
- oAuth2_ = input.readMessage(org.wso2.apk.enforcer.discovery.subscription.OAuth2.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(oAuth2_);
- oAuth2_ = subBuilder.buildPartial();
- }
-
- 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 {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_SecuritySchemes_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_SecuritySchemes_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes.class, org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes.Builder.class);
- }
-
- public static final int OAUTH2_FIELD_NUMBER = 1;
- private org.wso2.apk.enforcer.discovery.subscription.OAuth2 oAuth2_;
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- * @return Whether the oAuth2 field is set.
- */
- @java.lang.Override
- public boolean hasOAuth2() {
- return oAuth2_ != null;
- }
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- * @return The oAuth2.
- */
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.OAuth2 getOAuth2() {
- return oAuth2_ == null ? org.wso2.apk.enforcer.discovery.subscription.OAuth2.getDefaultInstance() : oAuth2_;
- }
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- */
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.OAuth2OrBuilder getOAuth2OrBuilder() {
- return getOAuth2();
- }
-
- 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 (oAuth2_ != null) {
- output.writeMessage(1, getOAuth2());
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (oAuth2_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getOAuth2());
- }
- 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.SecuritySchemes)) {
- return super.equals(obj);
- }
- org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes other = (org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes) obj;
-
- if (hasOAuth2() != other.hasOAuth2()) return false;
- if (hasOAuth2()) {
- if (!getOAuth2()
- .equals(other.getOAuth2())) 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();
- if (hasOAuth2()) {
- hash = (37 * hash) + OAUTH2_FIELD_NUMBER;
- hash = (53 * hash) + getOAuth2().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes 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.SecuritySchemes parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes 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.SecuritySchemes parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes 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.SecuritySchemes 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.SecuritySchemes 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.SecuritySchemes 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.SecuritySchemes 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.SecuritySchemes 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.SecuritySchemes 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.SecuritySchemes 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.SecuritySchemes}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:wso2.discovery.subscription.SecuritySchemes)
- org.wso2.apk.enforcer.discovery.subscription.SecuritySchemesOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_SecuritySchemes_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_SecuritySchemes_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes.class, org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes.Builder.class);
- }
-
- // Construct using org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes.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();
- if (oAuth2Builder_ == null) {
- oAuth2_ = null;
- } else {
- oAuth2_ = null;
- oAuth2Builder_ = null;
- }
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.internal_static_wso2_discovery_subscription_SecuritySchemes_descriptor;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes getDefaultInstanceForType() {
- return org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes build() {
- org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes buildPartial() {
- org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes result = new org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes(this);
- if (oAuth2Builder_ == null) {
- result.oAuth2_ = oAuth2_;
- } else {
- result.oAuth2_ = oAuth2Builder_.build();
- }
- 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.SecuritySchemes) {
- return mergeFrom((org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes other) {
- if (other == org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes.getDefaultInstance()) return this;
- if (other.hasOAuth2()) {
- mergeOAuth2(other.getOAuth2());
- }
- 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.SecuritySchemes parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private org.wso2.apk.enforcer.discovery.subscription.OAuth2 oAuth2_;
- private com.google.protobuf.SingleFieldBuilderV3<
- org.wso2.apk.enforcer.discovery.subscription.OAuth2, org.wso2.apk.enforcer.discovery.subscription.OAuth2.Builder, org.wso2.apk.enforcer.discovery.subscription.OAuth2OrBuilder> oAuth2Builder_;
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- * @return Whether the oAuth2 field is set.
- */
- public boolean hasOAuth2() {
- return oAuth2Builder_ != null || oAuth2_ != null;
- }
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- * @return The oAuth2.
- */
- public org.wso2.apk.enforcer.discovery.subscription.OAuth2 getOAuth2() {
- if (oAuth2Builder_ == null) {
- return oAuth2_ == null ? org.wso2.apk.enforcer.discovery.subscription.OAuth2.getDefaultInstance() : oAuth2_;
- } else {
- return oAuth2Builder_.getMessage();
- }
- }
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- */
- public Builder setOAuth2(org.wso2.apk.enforcer.discovery.subscription.OAuth2 value) {
- if (oAuth2Builder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- oAuth2_ = value;
- onChanged();
- } else {
- oAuth2Builder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- */
- public Builder setOAuth2(
- org.wso2.apk.enforcer.discovery.subscription.OAuth2.Builder builderForValue) {
- if (oAuth2Builder_ == null) {
- oAuth2_ = builderForValue.build();
- onChanged();
- } else {
- oAuth2Builder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- */
- public Builder mergeOAuth2(org.wso2.apk.enforcer.discovery.subscription.OAuth2 value) {
- if (oAuth2Builder_ == null) {
- if (oAuth2_ != null) {
- oAuth2_ =
- org.wso2.apk.enforcer.discovery.subscription.OAuth2.newBuilder(oAuth2_).mergeFrom(value).buildPartial();
- } else {
- oAuth2_ = value;
- }
- onChanged();
- } else {
- oAuth2Builder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- */
- public Builder clearOAuth2() {
- if (oAuth2Builder_ == null) {
- oAuth2_ = null;
- onChanged();
- } else {
- oAuth2_ = null;
- oAuth2Builder_ = null;
- }
-
- return this;
- }
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- */
- public org.wso2.apk.enforcer.discovery.subscription.OAuth2.Builder getOAuth2Builder() {
-
- onChanged();
- return getOAuth2FieldBuilder().getBuilder();
- }
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- */
- public org.wso2.apk.enforcer.discovery.subscription.OAuth2OrBuilder getOAuth2OrBuilder() {
- if (oAuth2Builder_ != null) {
- return oAuth2Builder_.getMessageOrBuilder();
- } else {
- return oAuth2_ == null ?
- org.wso2.apk.enforcer.discovery.subscription.OAuth2.getDefaultInstance() : oAuth2_;
- }
- }
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- org.wso2.apk.enforcer.discovery.subscription.OAuth2, org.wso2.apk.enforcer.discovery.subscription.OAuth2.Builder, org.wso2.apk.enforcer.discovery.subscription.OAuth2OrBuilder>
- getOAuth2FieldBuilder() {
- if (oAuth2Builder_ == null) {
- oAuth2Builder_ = new com.google.protobuf.SingleFieldBuilderV3<
- org.wso2.apk.enforcer.discovery.subscription.OAuth2, org.wso2.apk.enforcer.discovery.subscription.OAuth2.Builder, org.wso2.apk.enforcer.discovery.subscription.OAuth2OrBuilder>(
- getOAuth2(),
- getParentForChildren(),
- isClean());
- oAuth2_ = null;
- }
- return oAuth2Builder_;
- }
- @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.SecuritySchemes)
- }
-
- // @@protoc_insertion_point(class_scope:wso2.discovery.subscription.SecuritySchemes)
- private static final org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes();
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.SecuritySchemes getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public SecuritySchemes parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SecuritySchemes(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.SecuritySchemes getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SecuritySchemesOrBuilder.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SecuritySchemesOrBuilder.java
deleted file mode 100644
index 2c568b7ce0..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SecuritySchemesOrBuilder.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/application.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public interface SecuritySchemesOrBuilder extends
- // @@protoc_insertion_point(interface_extends:wso2.discovery.subscription.SecuritySchemes)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- * @return Whether the oAuth2 field is set.
- */
- boolean hasOAuth2();
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- * @return The oAuth2.
- */
- org.wso2.apk.enforcer.discovery.subscription.OAuth2 getOAuth2();
- /**
- * .wso2.discovery.subscription.OAuth2 oAuth2 = 1;
- */
- org.wso2.apk.enforcer.discovery.subscription.OAuth2OrBuilder getOAuth2OrBuilder();
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionList.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionList.java
deleted file mode 100644
index 96c2b94bc5..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionList.java
+++ /dev/null
@@ -1,778 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/subscription_list.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-/**
- *
- * SubscriptionList data model
- *
- *
- * Protobuf type {@code wso2.discovery.subscription.SubscriptionList}
- */
-public final class SubscriptionList extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:wso2.discovery.subscription.SubscriptionList)
- SubscriptionListOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use SubscriptionList.newBuilder() to construct.
- private SubscriptionList(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private SubscriptionList() {
- list_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new SubscriptionList();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private SubscriptionList(
- 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 18: {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- list_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- list_.add(
- input.readMessage(org.wso2.apk.enforcer.discovery.subscription.Subscription.parser(), extensionRegistry));
- 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)) {
- list_ = java.util.Collections.unmodifiableList(list_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionListProto.internal_static_wso2_discovery_subscription_SubscriptionList_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionListProto.internal_static_wso2_discovery_subscription_SubscriptionList_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionList.class, org.wso2.apk.enforcer.discovery.subscription.SubscriptionList.Builder.class);
- }
-
- public static final int LIST_FIELD_NUMBER = 2;
- private java.util.List list_;
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- @java.lang.Override
- public java.util.List getListList() {
- return list_;
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- @java.lang.Override
- public java.util.List extends org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder>
- getListOrBuilderList() {
- return list_;
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- @java.lang.Override
- public int getListCount() {
- return list_.size();
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.Subscription getList(int index) {
- return list_.get(index);
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder getListOrBuilder(
- int index) {
- return list_.get(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 {
- for (int i = 0; i < list_.size(); i++) {
- output.writeMessage(2, list_.get(i));
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- for (int i = 0; i < list_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, list_.get(i));
- }
- 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.SubscriptionList)) {
- return super.equals(obj);
- }
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionList other = (org.wso2.apk.enforcer.discovery.subscription.SubscriptionList) obj;
-
- if (!getListList()
- .equals(other.getListList())) 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();
- if (getListCount() > 0) {
- hash = (37 * hash) + LIST_FIELD_NUMBER;
- hash = (53 * hash) + getListList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionList parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionList 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.SubscriptionList parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionList 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.SubscriptionList parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionList 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.SubscriptionList 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.SubscriptionList 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.SubscriptionList 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.SubscriptionList 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.SubscriptionList 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.SubscriptionList 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.SubscriptionList 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;
- }
- /**
- *
- * SubscriptionList data model
- *
- *
- * Protobuf type {@code wso2.discovery.subscription.SubscriptionList}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:wso2.discovery.subscription.SubscriptionList)
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionListOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionListProto.internal_static_wso2_discovery_subscription_SubscriptionList_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionListProto.internal_static_wso2_discovery_subscription_SubscriptionList_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionList.class, org.wso2.apk.enforcer.discovery.subscription.SubscriptionList.Builder.class);
- }
-
- // Construct using org.wso2.apk.enforcer.discovery.subscription.SubscriptionList.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getListFieldBuilder();
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- if (listBuilder_ == null) {
- list_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- listBuilder_.clear();
- }
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionListProto.internal_static_wso2_discovery_subscription_SubscriptionList_descriptor;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionList getDefaultInstanceForType() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionList.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionList build() {
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionList result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionList buildPartial() {
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionList result = new org.wso2.apk.enforcer.discovery.subscription.SubscriptionList(this);
- int from_bitField0_ = bitField0_;
- if (listBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
- list_ = java.util.Collections.unmodifiableList(list_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.list_ = list_;
- } else {
- result.list_ = listBuilder_.build();
- }
- 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.SubscriptionList) {
- return mergeFrom((org.wso2.apk.enforcer.discovery.subscription.SubscriptionList)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.wso2.apk.enforcer.discovery.subscription.SubscriptionList other) {
- if (other == org.wso2.apk.enforcer.discovery.subscription.SubscriptionList.getDefaultInstance()) return this;
- if (listBuilder_ == null) {
- if (!other.list_.isEmpty()) {
- if (list_.isEmpty()) {
- list_ = other.list_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureListIsMutable();
- list_.addAll(other.list_);
- }
- onChanged();
- }
- } else {
- if (!other.list_.isEmpty()) {
- if (listBuilder_.isEmpty()) {
- listBuilder_.dispose();
- listBuilder_ = null;
- list_ = other.list_;
- bitField0_ = (bitField0_ & ~0x00000001);
- listBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getListFieldBuilder() : null;
- } else {
- listBuilder_.addAllMessages(other.list_);
- }
- }
- }
- 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.SubscriptionList parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.wso2.apk.enforcer.discovery.subscription.SubscriptionList) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private java.util.List list_ =
- java.util.Collections.emptyList();
- private void ensureListIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- list_ = new java.util.ArrayList(list_);
- bitField0_ |= 0x00000001;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- org.wso2.apk.enforcer.discovery.subscription.Subscription, org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder, org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder> listBuilder_;
-
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public java.util.List getListList() {
- if (listBuilder_ == null) {
- return java.util.Collections.unmodifiableList(list_);
- } else {
- return listBuilder_.getMessageList();
- }
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public int getListCount() {
- if (listBuilder_ == null) {
- return list_.size();
- } else {
- return listBuilder_.getCount();
- }
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public org.wso2.apk.enforcer.discovery.subscription.Subscription getList(int index) {
- if (listBuilder_ == null) {
- return list_.get(index);
- } else {
- return listBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public Builder setList(
- int index, org.wso2.apk.enforcer.discovery.subscription.Subscription value) {
- if (listBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureListIsMutable();
- list_.set(index, value);
- onChanged();
- } else {
- listBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public Builder setList(
- int index, org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder builderForValue) {
- if (listBuilder_ == null) {
- ensureListIsMutable();
- list_.set(index, builderForValue.build());
- onChanged();
- } else {
- listBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public Builder addList(org.wso2.apk.enforcer.discovery.subscription.Subscription value) {
- if (listBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureListIsMutable();
- list_.add(value);
- onChanged();
- } else {
- listBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public Builder addList(
- int index, org.wso2.apk.enforcer.discovery.subscription.Subscription value) {
- if (listBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureListIsMutable();
- list_.add(index, value);
- onChanged();
- } else {
- listBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public Builder addList(
- org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder builderForValue) {
- if (listBuilder_ == null) {
- ensureListIsMutable();
- list_.add(builderForValue.build());
- onChanged();
- } else {
- listBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public Builder addList(
- int index, org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder builderForValue) {
- if (listBuilder_ == null) {
- ensureListIsMutable();
- list_.add(index, builderForValue.build());
- onChanged();
- } else {
- listBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public Builder addAllList(
- java.lang.Iterable extends org.wso2.apk.enforcer.discovery.subscription.Subscription> values) {
- if (listBuilder_ == null) {
- ensureListIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, list_);
- onChanged();
- } else {
- listBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public Builder clearList() {
- if (listBuilder_ == null) {
- list_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- listBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public Builder removeList(int index) {
- if (listBuilder_ == null) {
- ensureListIsMutable();
- list_.remove(index);
- onChanged();
- } else {
- listBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder getListBuilder(
- int index) {
- return getListFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder getListOrBuilder(
- int index) {
- if (listBuilder_ == null) {
- return list_.get(index); } else {
- return listBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public java.util.List extends org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder>
- getListOrBuilderList() {
- if (listBuilder_ != null) {
- return listBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(list_);
- }
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder addListBuilder() {
- return getListFieldBuilder().addBuilder(
- org.wso2.apk.enforcer.discovery.subscription.Subscription.getDefaultInstance());
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder addListBuilder(
- int index) {
- return getListFieldBuilder().addBuilder(
- index, org.wso2.apk.enforcer.discovery.subscription.Subscription.getDefaultInstance());
- }
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- public java.util.List
- getListBuilderList() {
- return getListFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- org.wso2.apk.enforcer.discovery.subscription.Subscription, org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder, org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder>
- getListFieldBuilder() {
- if (listBuilder_ == null) {
- listBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- org.wso2.apk.enforcer.discovery.subscription.Subscription, org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder, org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder>(
- list_,
- ((bitField0_ & 0x00000001) != 0),
- getParentForChildren(),
- isClean());
- list_ = null;
- }
- return listBuilder_;
- }
- @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.SubscriptionList)
- }
-
- // @@protoc_insertion_point(class_scope:wso2.discovery.subscription.SubscriptionList)
- private static final org.wso2.apk.enforcer.discovery.subscription.SubscriptionList DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.wso2.apk.enforcer.discovery.subscription.SubscriptionList();
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionList getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public SubscriptionList parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SubscriptionList(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.SubscriptionList getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionListOrBuilder.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionListOrBuilder.java
deleted file mode 100644
index 111fcc5142..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionListOrBuilder.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/subscription_list.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public interface SubscriptionListOrBuilder extends
- // @@protoc_insertion_point(interface_extends:wso2.discovery.subscription.SubscriptionList)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- java.util.List
- getListList();
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- org.wso2.apk.enforcer.discovery.subscription.Subscription getList(int index);
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- int getListCount();
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- java.util.List extends org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder>
- getListOrBuilderList();
- /**
- * repeated .wso2.discovery.subscription.Subscription list = 2;
- */
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder getListOrBuilder(
- int index);
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionListProto.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionListProto.java
deleted file mode 100644
index ee1a7a7a11..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionListProto.java
+++ /dev/null
@@ -1,57 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/subscription_list.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public final class SubscriptionListProto {
- private SubscriptionListProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_wso2_discovery_subscription_SubscriptionList_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_wso2_discovery_subscription_SubscriptionList_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n3wso2/discovery/subscription/subscripti" +
- "on_list.proto\022\033wso2.discovery.subscripti" +
- "on\032.wso2/discovery/subscription/subscrip" +
- "tion.proto\"K\n\020SubscriptionList\0227\n\004list\030\002" +
- " \003(\0132).wso2.discovery.subscription.Subsc" +
- "riptionB\230\001\n,org.wso2.apk.enforcer.discov" +
- "ery.subscriptionB\025SubscriptionListProtoP" +
- "\001ZOgithub.com/envoyproxy/go-control-plan" +
- "e/wso2/discovery/subscription;subscripti" +
- "onb\006proto3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.getDescriptor(),
- });
- internal_static_wso2_discovery_subscription_SubscriptionList_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_wso2_discovery_subscription_SubscriptionList_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_wso2_discovery_subscription_SubscriptionList_descriptor,
- new java.lang.String[] { "List", });
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicy.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicy.java
deleted file mode 100644
index e08ae8e063..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicy.java
+++ /dev/null
@@ -1,1429 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/subscription_policy.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-/**
- *
- * SubscriptionPolicy data model
- *
- *
- * Protobuf type {@code wso2.discovery.subscription.SubscriptionPolicy}
- */
-public final class SubscriptionPolicy extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:wso2.discovery.subscription.SubscriptionPolicy)
- SubscriptionPolicyOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use SubscriptionPolicy.newBuilder() to construct.
- private SubscriptionPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private SubscriptionPolicy() {
- name_ = "";
- quotaType_ = "";
- rateLimitTimeUnit_ = "";
- tenantDomain_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new SubscriptionPolicy();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private SubscriptionPolicy(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8: {
-
- id_ = input.readInt32();
- break;
- }
- case 16: {
-
- tenantId_ = input.readInt32();
- break;
- }
- case 26: {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 34: {
- java.lang.String s = input.readStringRequireUtf8();
-
- quotaType_ = s;
- break;
- }
- case 40: {
-
- graphQLMaxComplexity_ = input.readInt32();
- break;
- }
- case 48: {
-
- graphQLMaxDepth_ = input.readInt32();
- break;
- }
- case 56: {
-
- rateLimitCount_ = input.readInt32();
- break;
- }
- case 66: {
- java.lang.String s = input.readStringRequireUtf8();
-
- rateLimitTimeUnit_ = s;
- break;
- }
- case 72: {
-
- stopOnQuotaReach_ = input.readBool();
- break;
- }
- case 82: {
- java.lang.String s = input.readStringRequireUtf8();
-
- tenantDomain_ = s;
- break;
- }
- case 88: {
-
- timestamp_ = input.readInt64();
- 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 {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyProto.internal_static_wso2_discovery_subscription_SubscriptionPolicy_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyProto.internal_static_wso2_discovery_subscription_SubscriptionPolicy_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.class, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.Builder.class);
- }
-
- public static final int ID_FIELD_NUMBER = 1;
- private int id_;
- /**
- * int32 id = 1;
- * @return The id.
- */
- @java.lang.Override
- public int getId() {
- return id_;
- }
-
- public static final int TENANTID_FIELD_NUMBER = 2;
- private int tenantId_;
- /**
- * int32 tenantId = 2;
- * @return The tenantId.
- */
- @java.lang.Override
- public int getTenantId() {
- return tenantId_;
- }
-
- public static final int NAME_FIELD_NUMBER = 3;
- 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 QUOTATYPE_FIELD_NUMBER = 4;
- private volatile java.lang.Object quotaType_;
- /**
- * string quotaType = 4;
- * @return The quotaType.
- */
- @java.lang.Override
- public java.lang.String getQuotaType() {
- java.lang.Object ref = quotaType_;
- 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();
- quotaType_ = s;
- return s;
- }
- }
- /**
- * string quotaType = 4;
- * @return The bytes for quotaType.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getQuotaTypeBytes() {
- java.lang.Object ref = quotaType_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- quotaType_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int GRAPHQLMAXCOMPLEXITY_FIELD_NUMBER = 5;
- private int graphQLMaxComplexity_;
- /**
- * int32 graphQLMaxComplexity = 5;
- * @return The graphQLMaxComplexity.
- */
- @java.lang.Override
- public int getGraphQLMaxComplexity() {
- return graphQLMaxComplexity_;
- }
-
- public static final int GRAPHQLMAXDEPTH_FIELD_NUMBER = 6;
- private int graphQLMaxDepth_;
- /**
- * int32 graphQLMaxDepth = 6;
- * @return The graphQLMaxDepth.
- */
- @java.lang.Override
- public int getGraphQLMaxDepth() {
- return graphQLMaxDepth_;
- }
-
- public static final int RATELIMITCOUNT_FIELD_NUMBER = 7;
- private int rateLimitCount_;
- /**
- * int32 rateLimitCount = 7;
- * @return The rateLimitCount.
- */
- @java.lang.Override
- public int getRateLimitCount() {
- return rateLimitCount_;
- }
-
- public static final int RATELIMITTIMEUNIT_FIELD_NUMBER = 8;
- private volatile java.lang.Object rateLimitTimeUnit_;
- /**
- * string rateLimitTimeUnit = 8;
- * @return The rateLimitTimeUnit.
- */
- @java.lang.Override
- public java.lang.String getRateLimitTimeUnit() {
- java.lang.Object ref = rateLimitTimeUnit_;
- 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();
- rateLimitTimeUnit_ = s;
- return s;
- }
- }
- /**
- * string rateLimitTimeUnit = 8;
- * @return The bytes for rateLimitTimeUnit.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getRateLimitTimeUnitBytes() {
- java.lang.Object ref = rateLimitTimeUnit_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- rateLimitTimeUnit_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int STOPONQUOTAREACH_FIELD_NUMBER = 9;
- private boolean stopOnQuotaReach_;
- /**
- * bool stopOnQuotaReach = 9;
- * @return The stopOnQuotaReach.
- */
- @java.lang.Override
- public boolean getStopOnQuotaReach() {
- return stopOnQuotaReach_;
- }
-
- public static final int TENANTDOMAIN_FIELD_NUMBER = 10;
- private volatile java.lang.Object tenantDomain_;
- /**
- * string tenantDomain = 10;
- * @return The tenantDomain.
- */
- @java.lang.Override
- public java.lang.String getTenantDomain() {
- java.lang.Object ref = tenantDomain_;
- 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();
- tenantDomain_ = s;
- return s;
- }
- }
- /**
- * string tenantDomain = 10;
- * @return The bytes for tenantDomain.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getTenantDomainBytes() {
- java.lang.Object ref = tenantDomain_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- tenantDomain_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int TIMESTAMP_FIELD_NUMBER = 11;
- private long timestamp_;
- /**
- * int64 timestamp = 11;
- * @return The timestamp.
- */
- @java.lang.Override
- public long getTimestamp() {
- return timestamp_;
- }
-
- 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 (id_ != 0) {
- output.writeInt32(1, id_);
- }
- if (tenantId_ != 0) {
- output.writeInt32(2, tenantId_);
- }
- if (!getNameBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
- }
- if (!getQuotaTypeBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, quotaType_);
- }
- if (graphQLMaxComplexity_ != 0) {
- output.writeInt32(5, graphQLMaxComplexity_);
- }
- if (graphQLMaxDepth_ != 0) {
- output.writeInt32(6, graphQLMaxDepth_);
- }
- if (rateLimitCount_ != 0) {
- output.writeInt32(7, rateLimitCount_);
- }
- if (!getRateLimitTimeUnitBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 8, rateLimitTimeUnit_);
- }
- if (stopOnQuotaReach_ != false) {
- output.writeBool(9, stopOnQuotaReach_);
- }
- if (!getTenantDomainBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 10, tenantDomain_);
- }
- if (timestamp_ != 0L) {
- output.writeInt64(11, timestamp_);
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (id_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(1, id_);
- }
- if (tenantId_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(2, tenantId_);
- }
- if (!getNameBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
- }
- if (!getQuotaTypeBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, quotaType_);
- }
- if (graphQLMaxComplexity_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(5, graphQLMaxComplexity_);
- }
- if (graphQLMaxDepth_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(6, graphQLMaxDepth_);
- }
- if (rateLimitCount_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(7, rateLimitCount_);
- }
- if (!getRateLimitTimeUnitBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, rateLimitTimeUnit_);
- }
- if (stopOnQuotaReach_ != false) {
- size += com.google.protobuf.CodedOutputStream
- .computeBoolSize(9, stopOnQuotaReach_);
- }
- if (!getTenantDomainBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, tenantDomain_);
- }
- if (timestamp_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(11, timestamp_);
- }
- 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.SubscriptionPolicy)) {
- return super.equals(obj);
- }
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy other = (org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy) obj;
-
- if (getId()
- != other.getId()) return false;
- if (getTenantId()
- != other.getTenantId()) return false;
- if (!getName()
- .equals(other.getName())) return false;
- if (!getQuotaType()
- .equals(other.getQuotaType())) return false;
- if (getGraphQLMaxComplexity()
- != other.getGraphQLMaxComplexity()) return false;
- if (getGraphQLMaxDepth()
- != other.getGraphQLMaxDepth()) return false;
- if (getRateLimitCount()
- != other.getRateLimitCount()) return false;
- if (!getRateLimitTimeUnit()
- .equals(other.getRateLimitTimeUnit())) return false;
- if (getStopOnQuotaReach()
- != other.getStopOnQuotaReach()) return false;
- if (!getTenantDomain()
- .equals(other.getTenantDomain())) return false;
- if (getTimestamp()
- != other.getTimestamp()) 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) + ID_FIELD_NUMBER;
- hash = (53 * hash) + getId();
- hash = (37 * hash) + TENANTID_FIELD_NUMBER;
- hash = (53 * hash) + getTenantId();
- hash = (37 * hash) + NAME_FIELD_NUMBER;
- hash = (53 * hash) + getName().hashCode();
- hash = (37 * hash) + QUOTATYPE_FIELD_NUMBER;
- hash = (53 * hash) + getQuotaType().hashCode();
- hash = (37 * hash) + GRAPHQLMAXCOMPLEXITY_FIELD_NUMBER;
- hash = (53 * hash) + getGraphQLMaxComplexity();
- hash = (37 * hash) + GRAPHQLMAXDEPTH_FIELD_NUMBER;
- hash = (53 * hash) + getGraphQLMaxDepth();
- hash = (37 * hash) + RATELIMITCOUNT_FIELD_NUMBER;
- hash = (53 * hash) + getRateLimitCount();
- hash = (37 * hash) + RATELIMITTIMEUNIT_FIELD_NUMBER;
- hash = (53 * hash) + getRateLimitTimeUnit().hashCode();
- hash = (37 * hash) + STOPONQUOTAREACH_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
- getStopOnQuotaReach());
- hash = (37 * hash) + TENANTDOMAIN_FIELD_NUMBER;
- hash = (53 * hash) + getTenantDomain().hashCode();
- hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getTimestamp());
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy 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.SubscriptionPolicy parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy 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.SubscriptionPolicy parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy 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.SubscriptionPolicy 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.SubscriptionPolicy 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.SubscriptionPolicy 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.SubscriptionPolicy 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.SubscriptionPolicy 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.SubscriptionPolicy 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.SubscriptionPolicy 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;
- }
- /**
- *
- * SubscriptionPolicy data model
- *
- *
- * Protobuf type {@code wso2.discovery.subscription.SubscriptionPolicy}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:wso2.discovery.subscription.SubscriptionPolicy)
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyProto.internal_static_wso2_discovery_subscription_SubscriptionPolicy_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyProto.internal_static_wso2_discovery_subscription_SubscriptionPolicy_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.class, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.Builder.class);
- }
-
- // Construct using org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.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();
- id_ = 0;
-
- tenantId_ = 0;
-
- name_ = "";
-
- quotaType_ = "";
-
- graphQLMaxComplexity_ = 0;
-
- graphQLMaxDepth_ = 0;
-
- rateLimitCount_ = 0;
-
- rateLimitTimeUnit_ = "";
-
- stopOnQuotaReach_ = false;
-
- tenantDomain_ = "";
-
- timestamp_ = 0L;
-
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyProto.internal_static_wso2_discovery_subscription_SubscriptionPolicy_descriptor;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy getDefaultInstanceForType() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy build() {
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy buildPartial() {
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy result = new org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy(this);
- result.id_ = id_;
- result.tenantId_ = tenantId_;
- result.name_ = name_;
- result.quotaType_ = quotaType_;
- result.graphQLMaxComplexity_ = graphQLMaxComplexity_;
- result.graphQLMaxDepth_ = graphQLMaxDepth_;
- result.rateLimitCount_ = rateLimitCount_;
- result.rateLimitTimeUnit_ = rateLimitTimeUnit_;
- result.stopOnQuotaReach_ = stopOnQuotaReach_;
- result.tenantDomain_ = tenantDomain_;
- result.timestamp_ = timestamp_;
- 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.SubscriptionPolicy) {
- return mergeFrom((org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy other) {
- if (other == org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.getDefaultInstance()) return this;
- if (other.getId() != 0) {
- setId(other.getId());
- }
- if (other.getTenantId() != 0) {
- setTenantId(other.getTenantId());
- }
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- onChanged();
- }
- if (!other.getQuotaType().isEmpty()) {
- quotaType_ = other.quotaType_;
- onChanged();
- }
- if (other.getGraphQLMaxComplexity() != 0) {
- setGraphQLMaxComplexity(other.getGraphQLMaxComplexity());
- }
- if (other.getGraphQLMaxDepth() != 0) {
- setGraphQLMaxDepth(other.getGraphQLMaxDepth());
- }
- if (other.getRateLimitCount() != 0) {
- setRateLimitCount(other.getRateLimitCount());
- }
- if (!other.getRateLimitTimeUnit().isEmpty()) {
- rateLimitTimeUnit_ = other.rateLimitTimeUnit_;
- onChanged();
- }
- if (other.getStopOnQuotaReach() != false) {
- setStopOnQuotaReach(other.getStopOnQuotaReach());
- }
- if (!other.getTenantDomain().isEmpty()) {
- tenantDomain_ = other.tenantDomain_;
- onChanged();
- }
- if (other.getTimestamp() != 0L) {
- setTimestamp(other.getTimestamp());
- }
- 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.SubscriptionPolicy parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private int id_ ;
- /**
- * int32 id = 1;
- * @return The id.
- */
- @java.lang.Override
- public int getId() {
- return id_;
- }
- /**
- * int32 id = 1;
- * @param value The id to set.
- * @return This builder for chaining.
- */
- public Builder setId(int value) {
-
- id_ = value;
- onChanged();
- return this;
- }
- /**
- * int32 id = 1;
- * @return This builder for chaining.
- */
- public Builder clearId() {
-
- id_ = 0;
- onChanged();
- return this;
- }
-
- private int tenantId_ ;
- /**
- * int32 tenantId = 2;
- * @return The tenantId.
- */
- @java.lang.Override
- public int getTenantId() {
- return tenantId_;
- }
- /**
- * int32 tenantId = 2;
- * @param value The tenantId to set.
- * @return This builder for chaining.
- */
- public Builder setTenantId(int value) {
-
- tenantId_ = value;
- onChanged();
- return this;
- }
- /**
- * int32 tenantId = 2;
- * @return This builder for chaining.
- */
- public Builder clearTenantId() {
-
- tenantId_ = 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;
- onChanged();
- return this;
- }
- /**
- * string name = 3;
- * @return This builder for chaining.
- */
- public Builder clearName() {
-
- name_ = getDefaultInstance().getName();
- 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;
- onChanged();
- return this;
- }
-
- private java.lang.Object quotaType_ = "";
- /**
- * string quotaType = 4;
- * @return The quotaType.
- */
- public java.lang.String getQuotaType() {
- java.lang.Object ref = quotaType_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- quotaType_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * string quotaType = 4;
- * @return The bytes for quotaType.
- */
- public com.google.protobuf.ByteString
- getQuotaTypeBytes() {
- java.lang.Object ref = quotaType_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- quotaType_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * string quotaType = 4;
- * @param value The quotaType to set.
- * @return This builder for chaining.
- */
- public Builder setQuotaType(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- quotaType_ = value;
- onChanged();
- return this;
- }
- /**
- * string quotaType = 4;
- * @return This builder for chaining.
- */
- public Builder clearQuotaType() {
-
- quotaType_ = getDefaultInstance().getQuotaType();
- onChanged();
- return this;
- }
- /**
- * string quotaType = 4;
- * @param value The bytes for quotaType to set.
- * @return This builder for chaining.
- */
- public Builder setQuotaTypeBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- quotaType_ = value;
- onChanged();
- return this;
- }
-
- private int graphQLMaxComplexity_ ;
- /**
- * int32 graphQLMaxComplexity = 5;
- * @return The graphQLMaxComplexity.
- */
- @java.lang.Override
- public int getGraphQLMaxComplexity() {
- return graphQLMaxComplexity_;
- }
- /**
- * int32 graphQLMaxComplexity = 5;
- * @param value The graphQLMaxComplexity to set.
- * @return This builder for chaining.
- */
- public Builder setGraphQLMaxComplexity(int value) {
-
- graphQLMaxComplexity_ = value;
- onChanged();
- return this;
- }
- /**
- * int32 graphQLMaxComplexity = 5;
- * @return This builder for chaining.
- */
- public Builder clearGraphQLMaxComplexity() {
-
- graphQLMaxComplexity_ = 0;
- onChanged();
- return this;
- }
-
- private int graphQLMaxDepth_ ;
- /**
- * int32 graphQLMaxDepth = 6;
- * @return The graphQLMaxDepth.
- */
- @java.lang.Override
- public int getGraphQLMaxDepth() {
- return graphQLMaxDepth_;
- }
- /**
- * int32 graphQLMaxDepth = 6;
- * @param value The graphQLMaxDepth to set.
- * @return This builder for chaining.
- */
- public Builder setGraphQLMaxDepth(int value) {
-
- graphQLMaxDepth_ = value;
- onChanged();
- return this;
- }
- /**
- * int32 graphQLMaxDepth = 6;
- * @return This builder for chaining.
- */
- public Builder clearGraphQLMaxDepth() {
-
- graphQLMaxDepth_ = 0;
- onChanged();
- return this;
- }
-
- private int rateLimitCount_ ;
- /**
- * int32 rateLimitCount = 7;
- * @return The rateLimitCount.
- */
- @java.lang.Override
- public int getRateLimitCount() {
- return rateLimitCount_;
- }
- /**
- * int32 rateLimitCount = 7;
- * @param value The rateLimitCount to set.
- * @return This builder for chaining.
- */
- public Builder setRateLimitCount(int value) {
-
- rateLimitCount_ = value;
- onChanged();
- return this;
- }
- /**
- * int32 rateLimitCount = 7;
- * @return This builder for chaining.
- */
- public Builder clearRateLimitCount() {
-
- rateLimitCount_ = 0;
- onChanged();
- return this;
- }
-
- private java.lang.Object rateLimitTimeUnit_ = "";
- /**
- * string rateLimitTimeUnit = 8;
- * @return The rateLimitTimeUnit.
- */
- public java.lang.String getRateLimitTimeUnit() {
- java.lang.Object ref = rateLimitTimeUnit_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- rateLimitTimeUnit_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * string rateLimitTimeUnit = 8;
- * @return The bytes for rateLimitTimeUnit.
- */
- public com.google.protobuf.ByteString
- getRateLimitTimeUnitBytes() {
- java.lang.Object ref = rateLimitTimeUnit_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- rateLimitTimeUnit_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * string rateLimitTimeUnit = 8;
- * @param value The rateLimitTimeUnit to set.
- * @return This builder for chaining.
- */
- public Builder setRateLimitTimeUnit(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- rateLimitTimeUnit_ = value;
- onChanged();
- return this;
- }
- /**
- * string rateLimitTimeUnit = 8;
- * @return This builder for chaining.
- */
- public Builder clearRateLimitTimeUnit() {
-
- rateLimitTimeUnit_ = getDefaultInstance().getRateLimitTimeUnit();
- onChanged();
- return this;
- }
- /**
- * string rateLimitTimeUnit = 8;
- * @param value The bytes for rateLimitTimeUnit to set.
- * @return This builder for chaining.
- */
- public Builder setRateLimitTimeUnitBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- rateLimitTimeUnit_ = value;
- onChanged();
- return this;
- }
-
- private boolean stopOnQuotaReach_ ;
- /**
- * bool stopOnQuotaReach = 9;
- * @return The stopOnQuotaReach.
- */
- @java.lang.Override
- public boolean getStopOnQuotaReach() {
- return stopOnQuotaReach_;
- }
- /**
- * bool stopOnQuotaReach = 9;
- * @param value The stopOnQuotaReach to set.
- * @return This builder for chaining.
- */
- public Builder setStopOnQuotaReach(boolean value) {
-
- stopOnQuotaReach_ = value;
- onChanged();
- return this;
- }
- /**
- * bool stopOnQuotaReach = 9;
- * @return This builder for chaining.
- */
- public Builder clearStopOnQuotaReach() {
-
- stopOnQuotaReach_ = false;
- onChanged();
- return this;
- }
-
- private java.lang.Object tenantDomain_ = "";
- /**
- * string tenantDomain = 10;
- * @return The tenantDomain.
- */
- public java.lang.String getTenantDomain() {
- java.lang.Object ref = tenantDomain_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- tenantDomain_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * string tenantDomain = 10;
- * @return The bytes for tenantDomain.
- */
- public com.google.protobuf.ByteString
- getTenantDomainBytes() {
- java.lang.Object ref = tenantDomain_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- tenantDomain_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * string tenantDomain = 10;
- * @param value The tenantDomain to set.
- * @return This builder for chaining.
- */
- public Builder setTenantDomain(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- tenantDomain_ = value;
- onChanged();
- return this;
- }
- /**
- * string tenantDomain = 10;
- * @return This builder for chaining.
- */
- public Builder clearTenantDomain() {
-
- tenantDomain_ = getDefaultInstance().getTenantDomain();
- onChanged();
- return this;
- }
- /**
- * string tenantDomain = 10;
- * @param value The bytes for tenantDomain to set.
- * @return This builder for chaining.
- */
- public Builder setTenantDomainBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- tenantDomain_ = value;
- onChanged();
- return this;
- }
-
- private long timestamp_ ;
- /**
- * int64 timestamp = 11;
- * @return The timestamp.
- */
- @java.lang.Override
- public long getTimestamp() {
- return timestamp_;
- }
- /**
- * int64 timestamp = 11;
- * @param value The timestamp to set.
- * @return This builder for chaining.
- */
- public Builder setTimestamp(long value) {
-
- timestamp_ = value;
- onChanged();
- return this;
- }
- /**
- * int64 timestamp = 11;
- * @return This builder for chaining.
- */
- public Builder clearTimestamp() {
-
- timestamp_ = 0L;
- 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.SubscriptionPolicy)
- }
-
- // @@protoc_insertion_point(class_scope:wso2.discovery.subscription.SubscriptionPolicy)
- private static final org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy();
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public SubscriptionPolicy parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SubscriptionPolicy(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.SubscriptionPolicy getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyList.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyList.java
deleted file mode 100644
index bcddf227c8..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyList.java
+++ /dev/null
@@ -1,778 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/subscription_policy_list.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-/**
- *
- * SubscriptionPolicyList data model
- *
- *
- * Protobuf type {@code wso2.discovery.subscription.SubscriptionPolicyList}
- */
-public final class SubscriptionPolicyList extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:wso2.discovery.subscription.SubscriptionPolicyList)
- SubscriptionPolicyListOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use SubscriptionPolicyList.newBuilder() to construct.
- private SubscriptionPolicyList(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private SubscriptionPolicyList() {
- list_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new SubscriptionPolicyList();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private SubscriptionPolicyList(
- 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 18: {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- list_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- list_.add(
- input.readMessage(org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.parser(), extensionRegistry));
- 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)) {
- list_ = java.util.Collections.unmodifiableList(list_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyListProto.internal_static_wso2_discovery_subscription_SubscriptionPolicyList_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyListProto.internal_static_wso2_discovery_subscription_SubscriptionPolicyList_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList.class, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList.Builder.class);
- }
-
- public static final int LIST_FIELD_NUMBER = 2;
- private java.util.List list_;
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- @java.lang.Override
- public java.util.List getListList() {
- return list_;
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- @java.lang.Override
- public java.util.List extends org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyOrBuilder>
- getListOrBuilderList() {
- return list_;
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- @java.lang.Override
- public int getListCount() {
- return list_.size();
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy getList(int index) {
- return list_.get(index);
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyOrBuilder getListOrBuilder(
- int index) {
- return list_.get(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 {
- for (int i = 0; i < list_.size(); i++) {
- output.writeMessage(2, list_.get(i));
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- for (int i = 0; i < list_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, list_.get(i));
- }
- 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.SubscriptionPolicyList)) {
- return super.equals(obj);
- }
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList other = (org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList) obj;
-
- if (!getListList()
- .equals(other.getListList())) 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();
- if (getListCount() > 0) {
- hash = (37 * hash) + LIST_FIELD_NUMBER;
- hash = (53 * hash) + getListList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList 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.SubscriptionPolicyList parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList 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.SubscriptionPolicyList parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList 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.SubscriptionPolicyList 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.SubscriptionPolicyList 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.SubscriptionPolicyList 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.SubscriptionPolicyList 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.SubscriptionPolicyList 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.SubscriptionPolicyList 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.SubscriptionPolicyList 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;
- }
- /**
- *
- * SubscriptionPolicyList data model
- *
- *
- * Protobuf type {@code wso2.discovery.subscription.SubscriptionPolicyList}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:wso2.discovery.subscription.SubscriptionPolicyList)
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyListOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyListProto.internal_static_wso2_discovery_subscription_SubscriptionPolicyList_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyListProto.internal_static_wso2_discovery_subscription_SubscriptionPolicyList_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList.class, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList.Builder.class);
- }
-
- // Construct using org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getListFieldBuilder();
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- if (listBuilder_ == null) {
- list_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- listBuilder_.clear();
- }
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyListProto.internal_static_wso2_discovery_subscription_SubscriptionPolicyList_descriptor;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList getDefaultInstanceForType() {
- return org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList build() {
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList buildPartial() {
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList result = new org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList(this);
- int from_bitField0_ = bitField0_;
- if (listBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
- list_ = java.util.Collections.unmodifiableList(list_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.list_ = list_;
- } else {
- result.list_ = listBuilder_.build();
- }
- 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.SubscriptionPolicyList) {
- return mergeFrom((org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList other) {
- if (other == org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList.getDefaultInstance()) return this;
- if (listBuilder_ == null) {
- if (!other.list_.isEmpty()) {
- if (list_.isEmpty()) {
- list_ = other.list_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureListIsMutable();
- list_.addAll(other.list_);
- }
- onChanged();
- }
- } else {
- if (!other.list_.isEmpty()) {
- if (listBuilder_.isEmpty()) {
- listBuilder_.dispose();
- listBuilder_ = null;
- list_ = other.list_;
- bitField0_ = (bitField0_ & ~0x00000001);
- listBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getListFieldBuilder() : null;
- } else {
- listBuilder_.addAllMessages(other.list_);
- }
- }
- }
- 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.SubscriptionPolicyList parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private java.util.List list_ =
- java.util.Collections.emptyList();
- private void ensureListIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- list_ = new java.util.ArrayList(list_);
- bitField0_ |= 0x00000001;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.Builder, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyOrBuilder> listBuilder_;
-
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public java.util.List getListList() {
- if (listBuilder_ == null) {
- return java.util.Collections.unmodifiableList(list_);
- } else {
- return listBuilder_.getMessageList();
- }
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public int getListCount() {
- if (listBuilder_ == null) {
- return list_.size();
- } else {
- return listBuilder_.getCount();
- }
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy getList(int index) {
- if (listBuilder_ == null) {
- return list_.get(index);
- } else {
- return listBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public Builder setList(
- int index, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy value) {
- if (listBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureListIsMutable();
- list_.set(index, value);
- onChanged();
- } else {
- listBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public Builder setList(
- int index, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.Builder builderForValue) {
- if (listBuilder_ == null) {
- ensureListIsMutable();
- list_.set(index, builderForValue.build());
- onChanged();
- } else {
- listBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public Builder addList(org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy value) {
- if (listBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureListIsMutable();
- list_.add(value);
- onChanged();
- } else {
- listBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public Builder addList(
- int index, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy value) {
- if (listBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureListIsMutable();
- list_.add(index, value);
- onChanged();
- } else {
- listBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public Builder addList(
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.Builder builderForValue) {
- if (listBuilder_ == null) {
- ensureListIsMutable();
- list_.add(builderForValue.build());
- onChanged();
- } else {
- listBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public Builder addList(
- int index, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.Builder builderForValue) {
- if (listBuilder_ == null) {
- ensureListIsMutable();
- list_.add(index, builderForValue.build());
- onChanged();
- } else {
- listBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public Builder addAllList(
- java.lang.Iterable extends org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy> values) {
- if (listBuilder_ == null) {
- ensureListIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, list_);
- onChanged();
- } else {
- listBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public Builder clearList() {
- if (listBuilder_ == null) {
- list_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- listBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public Builder removeList(int index) {
- if (listBuilder_ == null) {
- ensureListIsMutable();
- list_.remove(index);
- onChanged();
- } else {
- listBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.Builder getListBuilder(
- int index) {
- return getListFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyOrBuilder getListOrBuilder(
- int index) {
- if (listBuilder_ == null) {
- return list_.get(index); } else {
- return listBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public java.util.List extends org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyOrBuilder>
- getListOrBuilderList() {
- if (listBuilder_ != null) {
- return listBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(list_);
- }
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.Builder addListBuilder() {
- return getListFieldBuilder().addBuilder(
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.getDefaultInstance());
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.Builder addListBuilder(
- int index) {
- return getListFieldBuilder().addBuilder(
- index, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.getDefaultInstance());
- }
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- public java.util.List
- getListBuilderList() {
- return getListFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.Builder, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyOrBuilder>
- getListFieldBuilder() {
- if (listBuilder_ == null) {
- listBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy.Builder, org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyOrBuilder>(
- list_,
- ((bitField0_ & 0x00000001) != 0),
- getParentForChildren(),
- isClean());
- list_ = null;
- }
- return listBuilder_;
- }
- @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.SubscriptionPolicyList)
- }
-
- // @@protoc_insertion_point(class_scope:wso2.discovery.subscription.SubscriptionPolicyList)
- private static final org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList();
- }
-
- public static org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyList getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public SubscriptionPolicyList parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SubscriptionPolicyList(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.SubscriptionPolicyList getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyListOrBuilder.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyListOrBuilder.java
deleted file mode 100644
index 6340a52d5c..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyListOrBuilder.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/subscription_policy_list.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public interface SubscriptionPolicyListOrBuilder extends
- // @@protoc_insertion_point(interface_extends:wso2.discovery.subscription.SubscriptionPolicyList)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- java.util.List
- getListList();
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicy getList(int index);
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- int getListCount();
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- java.util.List extends org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyOrBuilder>
- getListOrBuilderList();
- /**
- * repeated .wso2.discovery.subscription.SubscriptionPolicy list = 2;
- */
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyOrBuilder getListOrBuilder(
- int index);
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyListProto.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyListProto.java
deleted file mode 100644
index c5d1304c32..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyListProto.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/subscription_policy_list.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public final class SubscriptionPolicyListProto {
- private SubscriptionPolicyListProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_wso2_discovery_subscription_SubscriptionPolicyList_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_wso2_discovery_subscription_SubscriptionPolicyList_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n:wso2/discovery/subscription/subscripti" +
- "on_policy_list.proto\022\033wso2.discovery.sub" +
- "scription\0325wso2/discovery/subscription/s" +
- "ubscription_policy.proto\"W\n\026Subscription" +
- "PolicyList\022=\n\004list\030\002 \003(\0132/.wso2.discover" +
- "y.subscription.SubscriptionPolicyB\236\001\n,or" +
- "g.wso2.apk.enforcer.discovery.subscripti" +
- "onB\033SubscriptionPolicyListProtoP\001ZOgithu" +
- "b.com/envoyproxy/go-control-plane/wso2/d" +
- "iscovery/subscription;subscriptionb\006prot" +
- "o3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyProto.getDescriptor(),
- });
- internal_static_wso2_discovery_subscription_SubscriptionPolicyList_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_wso2_discovery_subscription_SubscriptionPolicyList_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_wso2_discovery_subscription_SubscriptionPolicyList_descriptor,
- new java.lang.String[] { "List", });
- org.wso2.apk.enforcer.discovery.subscription.SubscriptionPolicyProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyOrBuilder.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyOrBuilder.java
deleted file mode 100644
index 68b563f5f7..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyOrBuilder.java
+++ /dev/null
@@ -1,99 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/subscription_policy.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public interface SubscriptionPolicyOrBuilder extends
- // @@protoc_insertion_point(interface_extends:wso2.discovery.subscription.SubscriptionPolicy)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * int32 id = 1;
- * @return The id.
- */
- int getId();
-
- /**
- * int32 tenantId = 2;
- * @return The tenantId.
- */
- int getTenantId();
-
- /**
- * string name = 3;
- * @return The name.
- */
- java.lang.String getName();
- /**
- * string name = 3;
- * @return The bytes for name.
- */
- com.google.protobuf.ByteString
- getNameBytes();
-
- /**
- * string quotaType = 4;
- * @return The quotaType.
- */
- java.lang.String getQuotaType();
- /**
- * string quotaType = 4;
- * @return The bytes for quotaType.
- */
- com.google.protobuf.ByteString
- getQuotaTypeBytes();
-
- /**
- * int32 graphQLMaxComplexity = 5;
- * @return The graphQLMaxComplexity.
- */
- int getGraphQLMaxComplexity();
-
- /**
- * int32 graphQLMaxDepth = 6;
- * @return The graphQLMaxDepth.
- */
- int getGraphQLMaxDepth();
-
- /**
- * int32 rateLimitCount = 7;
- * @return The rateLimitCount.
- */
- int getRateLimitCount();
-
- /**
- * string rateLimitTimeUnit = 8;
- * @return The rateLimitTimeUnit.
- */
- java.lang.String getRateLimitTimeUnit();
- /**
- * string rateLimitTimeUnit = 8;
- * @return The bytes for rateLimitTimeUnit.
- */
- com.google.protobuf.ByteString
- getRateLimitTimeUnitBytes();
-
- /**
- * bool stopOnQuotaReach = 9;
- * @return The stopOnQuotaReach.
- */
- boolean getStopOnQuotaReach();
-
- /**
- * string tenantDomain = 10;
- * @return The tenantDomain.
- */
- java.lang.String getTenantDomain();
- /**
- * string tenantDomain = 10;
- * @return The bytes for tenantDomain.
- */
- com.google.protobuf.ByteString
- getTenantDomainBytes();
-
- /**
- * int64 timestamp = 11;
- * @return The timestamp.
- */
- long getTimestamp();
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyProto.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyProto.java
deleted file mode 100644
index db9ded6e68..0000000000
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionPolicyProto.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: wso2/discovery/subscription/subscription_policy.proto
-
-package org.wso2.apk.enforcer.discovery.subscription;
-
-public final class SubscriptionPolicyProto {
- private SubscriptionPolicyProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_wso2_discovery_subscription_SubscriptionPolicy_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_wso2_discovery_subscription_SubscriptionPolicy_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n5wso2/discovery/subscription/subscripti" +
- "on_policy.proto\022\033wso2.discovery.subscrip" +
- "tion\"\200\002\n\022SubscriptionPolicy\022\n\n\002id\030\001 \001(\005\022" +
- "\020\n\010tenantId\030\002 \001(\005\022\014\n\004name\030\003 \001(\t\022\021\n\tquota" +
- "Type\030\004 \001(\t\022\034\n\024graphQLMaxComplexity\030\005 \001(\005" +
- "\022\027\n\017graphQLMaxDepth\030\006 \001(\005\022\026\n\016rateLimitCo" +
- "unt\030\007 \001(\005\022\031\n\021rateLimitTimeUnit\030\010 \001(\t\022\030\n\020" +
- "stopOnQuotaReach\030\t \001(\010\022\024\n\014tenantDomain\030\n" +
- " \001(\t\022\021\n\ttimestamp\030\013 \001(\003B\232\001\n,org.wso2.apk" +
- ".enforcer.discovery.subscriptionB\027Subscr" +
- "iptionPolicyProtoP\001ZOgithub.com/envoypro" +
- "xy/go-control-plane/wso2/discovery/subsc" +
- "ription;subscriptionb\006proto3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- });
- internal_static_wso2_discovery_subscription_SubscriptionPolicy_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_wso2_discovery_subscription_SubscriptionPolicy_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_wso2_discovery_subscription_SubscriptionPolicy_descriptor,
- new java.lang.String[] { "Id", "TenantId", "Name", "QuotaType", "GraphQLMaxComplexity", "GraphQLMaxDepth", "RateLimitCount", "RateLimitTimeUnit", "StopOnQuotaReach", "TenantDomain", "Timestamp", });
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/subscription/EventingGrpcClient.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/subscription/EventingGrpcClient.java
new file mode 100644
index 0000000000..e4ee80e854
--- /dev/null
+++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/subscription/EventingGrpcClient.java
@@ -0,0 +1,120 @@
+package org.wso2.apk.enforcer.subscription;
+/*
+ * 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
+ * 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.
+ */
+
+import io.grpc.ConnectivityState;
+import io.grpc.ManagedChannel;
+import io.grpc.stub.StreamObserver;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.wso2.apk.enforcer.config.ConfigHolder;
+import org.wso2.apk.enforcer.discovery.scheduler.XdsSchedulerManager;
+import org.wso2.apk.enforcer.discovery.service.subscription.EventStreamServiceGrpc;
+import org.wso2.apk.enforcer.discovery.service.subscription.Request;
+import org.wso2.apk.enforcer.discovery.subscription.Event;
+import org.wso2.apk.enforcer.util.GRPCUtils;
+
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Client to communicate with JWTIssuer discovery service at the adapter.
+ */
+public class EventingGrpcClient implements Runnable {
+
+ private static final Logger logger = LogManager.getLogger(EventingGrpcClient.class);
+ private static EventingGrpcClient instance;
+ private ManagedChannel channel;
+ private EventStreamServiceGrpc.EventStreamServiceStub stub;
+ private final SubscriptionDataStoreImpl subscriptionDataStore;
+ private final String host;
+ private final String hostname;
+ private final int port;
+
+ private EventingGrpcClient(String host, String hostname, int port) {
+
+ this.host = host;
+ this.hostname = hostname;
+ this.port = port;
+ this.subscriptionDataStore = SubscriptionDataStoreImpl.getInstance();
+ initConnection();
+ }
+
+ private void initConnection() {
+
+ if (GRPCUtils.isReInitRequired(channel)) {
+ if (channel != null && !channel.isShutdown()) {
+ channel.shutdownNow();
+ do {
+ try {
+ channel.awaitTermination(100, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException e) {
+ logger.error("JWTISsuer discovery channel shutdown wait was interrupted", e);
+ }
+ } while (!channel.isShutdown());
+ }
+ this.channel = GRPCUtils.createSecuredChannel(logger, host, port, hostname);
+ this.stub = EventStreamServiceGrpc.newStub(channel);
+ } else if (channel.getState(true) == ConnectivityState.READY) {
+ XdsSchedulerManager.getInstance().stopEventStreamScheduling();
+ }
+ }
+
+ public static EventingGrpcClient getInstance() {
+
+ if (instance == null) {
+ String sdsHost = ConfigHolder.getInstance().getEnvVarConfig().getCommonControllerHost();
+ String sdsHostname = ConfigHolder.getInstance().getEnvVarConfig().getCommonControllerHostname();
+ int sdsPort = Integer.parseInt(ConfigHolder.getInstance().getEnvVarConfig().getCommonControllerXdsPort());
+ instance = new EventingGrpcClient(sdsHost, sdsHostname, sdsPort);
+ }
+ return instance;
+ }
+
+ public void run() {
+
+ initConnection();
+ watchEvents();
+ }
+
+ public void watchEvents() {
+
+ Request request = Request.newBuilder().setEvent("event").build();
+
+ stub.streamEvents(request, new StreamObserver() {
+ @Override
+ public void onNext(Event event) {
+
+ logger.info("Event received:" + event.toString());
+ XdsSchedulerManager.getInstance().stopEventStreamScheduling();
+ }
+
+ @Override
+ public void onError(Throwable t) {
+
+ logger.error("Event error", t);
+ XdsSchedulerManager.getInstance().startEventScheduling();
+
+ }
+
+ @Override
+ public void onCompleted() {
+ logger.info("Completed====");
+ }
+ });
+ }
+}
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 7b17e2b6ef..77514ac0cd 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
@@ -133,6 +133,7 @@ private void initializeLoadingTasks() {
loadApplicationKeyMappings();
ApiListDiscoveryClient.getInstance().watchApiList();
JWTIssuerDiscoveryClient.getInstance().watchJWTIssuers();
+ EventingGrpcClient.getInstance().watchEvents();
}
private void loadApplicationKeyMappings() {
diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/util/TLSUtils.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/util/TLSUtils.java
index 4a98930c01..62ff2a6767 100644
--- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/util/TLSUtils.java
+++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/util/TLSUtils.java
@@ -36,6 +36,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
+import java.security.Key;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
@@ -51,6 +52,7 @@
* Utility Functions related to TLS Certificates.
*/
public class TLSUtils {
+
private static final Logger log = LogManager.getLogger(TLSUtils.class);
private static final String X509 = "X.509";
private static final String crtExtension = ".crt";
@@ -65,6 +67,7 @@ public class TLSUtils {
*/
public static Certificate getCertificateFromFile(String filePath)
throws CertificateException, IOException, EnforcerException {
+
return getCertsFromFile(filePath, true).get(0);
}
@@ -90,6 +93,7 @@ public static Certificate getCertificateFromString(String certificateContent)
* @param trustStore Keystore with trusted certificates
*/
public static void addCertsToTruststore(KeyStore trustStore, String filePath) throws IOException {
+
if (!Files.exists(Paths.get(filePath))) {
log.error("The provided certificates directory/file path does not exist. : " + filePath);
return;
@@ -110,6 +114,7 @@ public static void addCertsToTruststore(KeyStore trustStore, String filePath) th
}
public static void convertAndAddCertificatesToTrustStore(KeyStore trustStore, List certificates) {
+
for (Certificate certificate : certificates) {
try {
trustStore.setCertificateEntry(RandomStringUtils.random(10, true, false),
@@ -122,6 +127,7 @@ public static void convertAndAddCertificatesToTrustStore(KeyStore trustStore, Li
private static List getCertsFromFile(String filepath, boolean restrictToOne)
throws CertificateException, IOException, EnforcerException {
+
String content = new String(Files.readAllBytes(Paths.get(filepath)));
if (!content.contains(endCertificateDelimiter)) {
@@ -154,6 +160,7 @@ private static List getCertsFromFile(String filepath, boolean restr
}
private static void updateTruststoreWithMultipleCertPem(KeyStore trustStore, String filePath) {
+
try {
List certificateList = getCertsFromFile(filePath, false);
certificateList.forEach(certificate -> {
@@ -171,6 +178,7 @@ private static void updateTruststoreWithMultipleCertPem(KeyStore trustStore, Str
}
public static Certificate getCertificate(String filePath) throws CertificateException, IOException {
+
try (FileInputStream fileInputStream = new FileInputStream(filePath)) {
String content = IOUtils.toString(fileInputStream);
return getCertificateFromContent(content);
@@ -178,6 +186,7 @@ public static Certificate getCertificate(String filePath) throws CertificateExce
}
public static Certificate getCertificateFromContent(String content) throws CertificateException, IOException {
+
CertificateFactory fact = CertificateFactory.getInstance(X509);
try (InputStream is = new ByteArrayInputStream(content.getBytes())) {
X509Certificate cert = (X509Certificate) fact.generateCertificate(is);
@@ -192,6 +201,7 @@ public static Certificate getCertificateFromContent(String content) throws Certi
* @throws SSLException
*/
public static SslContext buildGRPCServerSSLContext() throws SSLException {
+
File certFile = Paths.get(ConfigHolder.getInstance().getEnvVarConfig().getEnforcerPublicKeyPath()).toFile();
File keyFile = Paths.get(ConfigHolder.getInstance().getEnvVarConfig().getEnforcerPrivateKeyPath()).toFile();
@@ -202,6 +212,7 @@ public static SslContext buildGRPCServerSSLContext() throws SSLException {
}
public static KeyStore getDefaultCertTrustStore() throws EnforcerException {
+
try {
KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
@@ -215,6 +226,7 @@ public static KeyStore getDefaultCertTrustStore() throws EnforcerException {
public static void loadDefaultCertsToTrustStore(KeyStore trustStore) throws
NoSuchAlgorithmException, KeyStoreException {
+
TrustManagerFactory tmf = TrustManagerFactory
.getInstance(TrustManagerFactory.getDefaultAlgorithm());
// Using null here initialises the TMF with the default trust store.
@@ -243,4 +255,20 @@ public static void loadDefaultCertsToTrustStore(KeyStore trustStore) throws
});
}
}
+
+ public static KeyStore getKeyStore(String certPath, String keyPath) {
+ KeyStore keyStore = null;
+ try {
+ Certificate cert =
+ TLSUtils.getCertificateFromFile(certPath);
+ Key key = JWTUtils.getPrivateKey(keyPath);
+ keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
+ keyStore.load(null, null);
+ keyStore.setKeyEntry("client-keys", key, null, new Certificate[]{cert});
+ } catch (EnforcerException | CertificateException | IOException | KeyStoreException |
+ NoSuchAlgorithmException e) {
+ log.error("Error occurred while configuring KeyStore", e);
+ }
+ return keyStore;
+ }
}
diff --git a/helm-charts/values.yaml b/helm-charts/values.yaml
index 41fd0df101..9cb46b7b2f 100644
--- a/helm-charts/values.yaml
+++ b/helm-charts/values.yaml
@@ -212,8 +212,8 @@ wso2:
failureThreshold: 5
strategy: RollingUpdate
replicas: 1
- imagePullPolicy: Always
- image: wso2/apk-adapter:latest
+ imagePullPolicy: IfNotPresent
+ image: apk-adapter:1.0.0-SNAPSHOT
security:
sslHostname: "adapter"
# logging: