All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation Maven / Gradle / Ivy

There is a newer version: 2.0.7.Final
Show newest version
/*
 * Copyright 2020 Google LLC
 *
 * Licensed 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
 *
 *     https://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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/api/auth.proto

package com.aliyun.openservices.ons.shaded.com.google.api;

/**
 *
 *
 * 
 * Specifies a location to extract JWT from an API request.
 * 
* * Protobuf type {@code google.api.JwtLocation} */ public final class JwtLocation extends com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.api.JwtLocation) JwtLocationOrBuilder { private static final long serialVersionUID = 0L; // Use JwtLocation.newBuilder() to construct. private JwtLocation(com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private JwtLocation() { valuePrefix_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new JwtLocation(); } @java.lang.Override public final com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private JwtLocation( com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input, com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.aliyun.openservices.ons.shaded.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(); inCase_ = 1; in_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); inCase_ = 2; in_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); valuePrefix_ = s; break; } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.aliyun.openservices.ons.shaded.com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.aliyun.openservices.ons.shaded.com.google.api.AuthProto.internal_static_google_api_JwtLocation_descriptor; } @java.lang.Override protected com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.aliyun.openservices.ons.shaded.com.google.api.AuthProto.internal_static_google_api_JwtLocation_fieldAccessorTable .ensureFieldAccessorsInitialized( com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation.class, com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation.Builder.class); } private int inCase_ = 0; private java.lang.Object in_; public enum InCase implements com.aliyun.openservices.ons.shaded.com.google.protobuf.Internal.EnumLite, com.aliyun.openservices.ons.shaded.com.google.protobuf.AbstractMessage.InternalOneOfEnum { HEADER(1), QUERY(2), IN_NOT_SET(0); private final int value; private InCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static InCase valueOf(int value) { return forNumber(value); } public static InCase forNumber(int value) { switch (value) { case 1: return HEADER; case 2: return QUERY; case 0: return IN_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public InCase getInCase() { return InCase.forNumber(inCase_); } public static final int HEADER_FIELD_NUMBER = 1; /** * * *
   * Specifies HTTP header name to extract JWT token.
   * 
* * string header = 1; * * @return Whether the header field is set. */ public boolean hasHeader() { return inCase_ == 1; } /** * * *
   * Specifies HTTP header name to extract JWT token.
   * 
* * string header = 1; * * @return The header. */ public java.lang.String getHeader() { java.lang.Object ref = ""; if (inCase_ == 1) { ref = in_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString bs = (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (inCase_ == 1) { in_ = s; } return s; } } /** * * *
   * Specifies HTTP header name to extract JWT token.
   * 
* * string header = 1; * * @return The bytes for header. */ public com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString getHeaderBytes() { java.lang.Object ref = ""; if (inCase_ == 1) { ref = in_; } if (ref instanceof java.lang.String) { com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString b = com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (inCase_ == 1) { in_ = b; } return b; } else { return (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref; } } public static final int QUERY_FIELD_NUMBER = 2; /** * * *
   * Specifies URL query parameter name to extract JWT token.
   * 
* * string query = 2; * * @return Whether the query field is set. */ public boolean hasQuery() { return inCase_ == 2; } /** * * *
   * Specifies URL query parameter name to extract JWT token.
   * 
* * string query = 2; * * @return The query. */ public java.lang.String getQuery() { java.lang.Object ref = ""; if (inCase_ == 2) { ref = in_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString bs = (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (inCase_ == 2) { in_ = s; } return s; } } /** * * *
   * Specifies URL query parameter name to extract JWT token.
   * 
* * string query = 2; * * @return The bytes for query. */ public com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = ""; if (inCase_ == 2) { ref = in_; } if (ref instanceof java.lang.String) { com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString b = com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (inCase_ == 2) { in_ = b; } return b; } else { return (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref; } } public static final int VALUE_PREFIX_FIELD_NUMBER = 3; private volatile java.lang.Object valuePrefix_; /** * * *
   * The value prefix. The value format is "value_prefix{token}"
   * Only applies to "in" header type. Must be empty for "in" query type.
   * If not empty, the header value has to match (case sensitive) this prefix.
   * If not matched, JWT will not be extracted. If matched, JWT will be
   * extracted after the prefix is removed.
   * For example, for "Authorization: Bearer {JWT}",
   * value_prefix="Bearer " with a space at the end.
   * 
* * string value_prefix = 3; * * @return The valuePrefix. */ @java.lang.Override public java.lang.String getValuePrefix() { java.lang.Object ref = valuePrefix_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString bs = (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); valuePrefix_ = s; return s; } } /** * * *
   * The value prefix. The value format is "value_prefix{token}"
   * Only applies to "in" header type. Must be empty for "in" query type.
   * If not empty, the header value has to match (case sensitive) this prefix.
   * If not matched, JWT will not be extracted. If matched, JWT will be
   * extracted after the prefix is removed.
   * For example, for "Authorization: Bearer {JWT}",
   * value_prefix="Bearer " with a space at the end.
   * 
* * string value_prefix = 3; * * @return The bytes for valuePrefix. */ @java.lang.Override public com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString getValuePrefixBytes() { java.lang.Object ref = valuePrefix_; if (ref instanceof java.lang.String) { com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString b = com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); valuePrefix_ = b; return b; } else { return (com.aliyun.openservices.ons.shaded.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.aliyun.openservices.ons.shaded.com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (inCase_ == 1) { com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.writeString(output, 1, in_); } if (inCase_ == 2) { com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.writeString(output, 2, in_); } if (!com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.isStringEmpty(valuePrefix_)) { com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.writeString(output, 3, valuePrefix_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (inCase_ == 1) { size += com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.computeStringSize(1, in_); } if (inCase_ == 2) { size += com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.computeStringSize(2, in_); } if (!com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.isStringEmpty(valuePrefix_)) { size += com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.computeStringSize(3, valuePrefix_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation)) { return super.equals(obj); } com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation other = (com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation) obj; if (!getValuePrefix().equals(other.getValuePrefix())) return false; if (!getInCase().equals(other.getInCase())) return false; switch (inCase_) { case 1: if (!getHeader().equals(other.getHeader())) return false; break; case 2: if (!getQuery().equals(other.getQuery())) return false; break; case 0: default: } 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) + VALUE_PREFIX_FIELD_NUMBER; hash = (53 * hash) + getValuePrefix().hashCode(); switch (inCase_) { case 1: hash = (37 * hash) + HEADER_FIELD_NUMBER; hash = (53 * hash) + getHeader().hashCode(); break; case 2: hash = (37 * hash) + QUERY_FIELD_NUMBER; hash = (53 * hash) + getQuery().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation parseFrom(java.nio.ByteBuffer data) throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation parseFrom( java.nio.ByteBuffer data, com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation parseFrom(com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString data) throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation parseFrom( com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString data, com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation parseFrom(byte[] data) throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation parseFrom( byte[] data, com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation parseFrom(java.io.InputStream input) throws java.io.IOException { return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation parseFrom( java.io.InputStream input, com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation parseDelimitedFrom( java.io.InputStream input, com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation parseFrom(com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation parseFrom( com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input, com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation 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.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * Specifies a location to extract JWT from an API request.
   * 
* * Protobuf type {@code google.api.JwtLocation} */ public static final class Builder extends com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.api.JwtLocation) com.aliyun.openservices.ons.shaded.com.google.api.JwtLocationOrBuilder { public static final com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.aliyun.openservices.ons.shaded.com.google.api.AuthProto.internal_static_google_api_JwtLocation_descriptor; } @java.lang.Override protected com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.aliyun.openservices.ons.shaded.com.google.api.AuthProto.internal_static_google_api_JwtLocation_fieldAccessorTable .ensureFieldAccessorsInitialized( com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation.class, com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation.Builder.class); } // Construct using com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); valuePrefix_ = ""; inCase_ = 0; in_ = null; return this; } @java.lang.Override public com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.aliyun.openservices.ons.shaded.com.google.api.AuthProto.internal_static_google_api_JwtLocation_descriptor; } @java.lang.Override public com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation getDefaultInstanceForType() { return com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation.getDefaultInstance(); } @java.lang.Override public com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation build() { com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation buildPartial() { com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation result = new com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation(this); if (inCase_ == 1) { result.in_ = in_; } if (inCase_ == 2) { result.in_ = in_; } result.valuePrefix_ = valuePrefix_; result.inCase_ = inCase_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.aliyun.openservices.ons.shaded.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.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.aliyun.openservices.ons.shaded.com.google.protobuf.Message other) { if (other instanceof com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation) { return mergeFrom((com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation other) { if (other == com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation.getDefaultInstance()) return this; if (!other.getValuePrefix().isEmpty()) { valuePrefix_ = other.valuePrefix_; onChanged(); } switch (other.getInCase()) { case HEADER: { inCase_ = 1; in_ = other.in_; onChanged(); break; } case QUERY: { inCase_ = 2; in_ = other.in_; onChanged(); break; } case IN_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input, com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int inCase_ = 0; private java.lang.Object in_; public InCase getInCase() { return InCase.forNumber(inCase_); } public Builder clearIn() { inCase_ = 0; in_ = null; onChanged(); return this; } /** * * *
     * Specifies HTTP header name to extract JWT token.
     * 
* * string header = 1; * * @return Whether the header field is set. */ @java.lang.Override public boolean hasHeader() { return inCase_ == 1; } /** * * *
     * Specifies HTTP header name to extract JWT token.
     * 
* * string header = 1; * * @return The header. */ @java.lang.Override public java.lang.String getHeader() { java.lang.Object ref = ""; if (inCase_ == 1) { ref = in_; } if (!(ref instanceof java.lang.String)) { com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString bs = (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (inCase_ == 1) { in_ = s; } return s; } else { return (java.lang.String) ref; } } /** * * *
     * Specifies HTTP header name to extract JWT token.
     * 
* * string header = 1; * * @return The bytes for header. */ @java.lang.Override public com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString getHeaderBytes() { java.lang.Object ref = ""; if (inCase_ == 1) { ref = in_; } if (ref instanceof String) { com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString b = com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (inCase_ == 1) { in_ = b; } return b; } else { return (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref; } } /** * * *
     * Specifies HTTP header name to extract JWT token.
     * 
* * string header = 1; * * @param value The header to set. * @return This builder for chaining. */ public Builder setHeader(java.lang.String value) { if (value == null) { throw new NullPointerException(); } inCase_ = 1; in_ = value; onChanged(); return this; } /** * * *
     * Specifies HTTP header name to extract JWT token.
     * 
* * string header = 1; * * @return This builder for chaining. */ public Builder clearHeader() { if (inCase_ == 1) { inCase_ = 0; in_ = null; onChanged(); } return this; } /** * * *
     * Specifies HTTP header name to extract JWT token.
     * 
* * string header = 1; * * @param value The bytes for header to set. * @return This builder for chaining. */ public Builder setHeaderBytes(com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); inCase_ = 1; in_ = value; onChanged(); return this; } /** * * *
     * Specifies URL query parameter name to extract JWT token.
     * 
* * string query = 2; * * @return Whether the query field is set. */ @java.lang.Override public boolean hasQuery() { return inCase_ == 2; } /** * * *
     * Specifies URL query parameter name to extract JWT token.
     * 
* * string query = 2; * * @return The query. */ @java.lang.Override public java.lang.String getQuery() { java.lang.Object ref = ""; if (inCase_ == 2) { ref = in_; } if (!(ref instanceof java.lang.String)) { com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString bs = (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (inCase_ == 2) { in_ = s; } return s; } else { return (java.lang.String) ref; } } /** * * *
     * Specifies URL query parameter name to extract JWT token.
     * 
* * string query = 2; * * @return The bytes for query. */ @java.lang.Override public com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = ""; if (inCase_ == 2) { ref = in_; } if (ref instanceof String) { com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString b = com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (inCase_ == 2) { in_ = b; } return b; } else { return (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref; } } /** * * *
     * Specifies URL query parameter name to extract JWT token.
     * 
* * string query = 2; * * @param value The query to set. * @return This builder for chaining. */ public Builder setQuery(java.lang.String value) { if (value == null) { throw new NullPointerException(); } inCase_ = 2; in_ = value; onChanged(); return this; } /** * * *
     * Specifies URL query parameter name to extract JWT token.
     * 
* * string query = 2; * * @return This builder for chaining. */ public Builder clearQuery() { if (inCase_ == 2) { inCase_ = 0; in_ = null; onChanged(); } return this; } /** * * *
     * Specifies URL query parameter name to extract JWT token.
     * 
* * string query = 2; * * @param value The bytes for query to set. * @return This builder for chaining. */ public Builder setQueryBytes(com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); inCase_ = 2; in_ = value; onChanged(); return this; } private java.lang.Object valuePrefix_ = ""; /** * * *
     * The value prefix. The value format is "value_prefix{token}"
     * Only applies to "in" header type. Must be empty for "in" query type.
     * If not empty, the header value has to match (case sensitive) this prefix.
     * If not matched, JWT will not be extracted. If matched, JWT will be
     * extracted after the prefix is removed.
     * For example, for "Authorization: Bearer {JWT}",
     * value_prefix="Bearer " with a space at the end.
     * 
* * string value_prefix = 3; * * @return The valuePrefix. */ public java.lang.String getValuePrefix() { java.lang.Object ref = valuePrefix_; if (!(ref instanceof java.lang.String)) { com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString bs = (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); valuePrefix_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The value prefix. The value format is "value_prefix{token}"
     * Only applies to "in" header type. Must be empty for "in" query type.
     * If not empty, the header value has to match (case sensitive) this prefix.
     * If not matched, JWT will not be extracted. If matched, JWT will be
     * extracted after the prefix is removed.
     * For example, for "Authorization: Bearer {JWT}",
     * value_prefix="Bearer " with a space at the end.
     * 
* * string value_prefix = 3; * * @return The bytes for valuePrefix. */ public com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString getValuePrefixBytes() { java.lang.Object ref = valuePrefix_; if (ref instanceof String) { com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString b = com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); valuePrefix_ = b; return b; } else { return (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref; } } /** * * *
     * The value prefix. The value format is "value_prefix{token}"
     * Only applies to "in" header type. Must be empty for "in" query type.
     * If not empty, the header value has to match (case sensitive) this prefix.
     * If not matched, JWT will not be extracted. If matched, JWT will be
     * extracted after the prefix is removed.
     * For example, for "Authorization: Bearer {JWT}",
     * value_prefix="Bearer " with a space at the end.
     * 
* * string value_prefix = 3; * * @param value The valuePrefix to set. * @return This builder for chaining. */ public Builder setValuePrefix(java.lang.String value) { if (value == null) { throw new NullPointerException(); } valuePrefix_ = value; onChanged(); return this; } /** * * *
     * The value prefix. The value format is "value_prefix{token}"
     * Only applies to "in" header type. Must be empty for "in" query type.
     * If not empty, the header value has to match (case sensitive) this prefix.
     * If not matched, JWT will not be extracted. If matched, JWT will be
     * extracted after the prefix is removed.
     * For example, for "Authorization: Bearer {JWT}",
     * value_prefix="Bearer " with a space at the end.
     * 
* * string value_prefix = 3; * * @return This builder for chaining. */ public Builder clearValuePrefix() { valuePrefix_ = getDefaultInstance().getValuePrefix(); onChanged(); return this; } /** * * *
     * The value prefix. The value format is "value_prefix{token}"
     * Only applies to "in" header type. Must be empty for "in" query type.
     * If not empty, the header value has to match (case sensitive) this prefix.
     * If not matched, JWT will not be extracted. If matched, JWT will be
     * extracted after the prefix is removed.
     * For example, for "Authorization: Bearer {JWT}",
     * value_prefix="Bearer " with a space at the end.
     * 
* * string value_prefix = 3; * * @param value The bytes for valuePrefix to set. * @return This builder for chaining. */ public Builder setValuePrefixBytes(com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); valuePrefix_ = value; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields(final com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.api.JwtLocation) } // @@protoc_insertion_point(class_scope:google.api.JwtLocation) private static final com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation(); } public static com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.aliyun.openservices.ons.shaded.com.google.protobuf.Parser PARSER = new com.aliyun.openservices.ons.shaded.com.google.protobuf.AbstractParser() { @java.lang.Override public JwtLocation parsePartialFrom( com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input, com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException { return new JwtLocation(input, extensionRegistry); } }; public static com.aliyun.openservices.ons.shaded.com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.aliyun.openservices.ons.shaded.com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.aliyun.openservices.ons.shaded.com.google.api.JwtLocation getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy