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

io.opencannabis.schema.oauth.Client Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2019, Momentum Ideas Co.
 *
 * 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
 *
 *  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.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: oauth/Client.proto

package io.opencannabis.schema.oauth;

/**
 * 
 * Specifies an OAuth2-client that can perform authorization operations in certain circumstances.
 * 
* * Protobuf type {@code opencannabis.oauth.Client} */ public final class Client extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opencannabis.oauth.Client) ClientOrBuilder { private static final long serialVersionUID = 0L; // Use Client.newBuilder() to construct. private Client(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Client() { id_ = ""; secret_ = ""; name_ = ""; contact_ = com.google.protobuf.LazyStringArrayList.EMPTY; grantTypes_ = java.util.Collections.emptyList(); owner_ = ""; redirectUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; responseType_ = java.util.Collections.emptyList(); scope_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Client( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); id_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); secret_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000008) != 0)) { contact_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000008; } contact_.add(s); break; } case 40: { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000010) != 0)) { grantTypes_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000010; } grantTypes_.add(rawValue); break; } case 42: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while(input.getBytesUntilLimit() > 0) { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000010) != 0)) { grantTypes_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000010; } grantTypes_.add(rawValue); } input.popLimit(oldLimit); break; } case 50: { io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder subBuilder = null; if (branding_ != null) { subBuilder = branding_.toBuilder(); } branding_ = input.readMessage(io.opencannabis.schema.media.AttachedMedia.MediaItem.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(branding_); branding_ = subBuilder.buildPartial(); } break; } case 58: { java.lang.String s = input.readStringRequireUtf8(); owner_ = s; break; } case 66: { io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder subBuilder = null; if (policy_ != null) { subBuilder = policy_.toBuilder(); } policy_ = input.readMessage(io.opencannabis.schema.media.AttachedMedia.MediaItem.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(policy_); policy_ = subBuilder.buildPartial(); } break; } case 74: { io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder subBuilder = null; if (terms_ != null) { subBuilder = terms_.toBuilder(); } terms_ = input.readMessage(io.opencannabis.schema.media.AttachedMedia.MediaItem.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(terms_); terms_ = subBuilder.buildPartial(); } break; } case 80: { public_ = input.readBool(); break; } case 90: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000400) != 0)) { redirectUri_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000400; } redirectUri_.add(s); break; } case 96: { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000800) != 0)) { responseType_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000800; } responseType_.add(rawValue); break; } case 98: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while(input.getBytesUntilLimit() > 0) { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000800) != 0)) { responseType_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000800; } responseType_.add(rawValue); } input.popLimit(oldLimit); break; } case 106: { if (!((mutable_bitField0_ & 0x00001000) != 0)) { scope_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00001000; } scope_.add( input.readMessage(io.opencannabis.schema.oauth.AuthorizationScope.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_ & 0x00000008) != 0)) { contact_ = contact_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000010) != 0)) { grantTypes_ = java.util.Collections.unmodifiableList(grantTypes_); } if (((mutable_bitField0_ & 0x00000400) != 0)) { redirectUri_ = redirectUri_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000800) != 0)) { responseType_ = java.util.Collections.unmodifiableList(responseType_); } if (((mutable_bitField0_ & 0x00001000) != 0)) { scope_ = java.util.Collections.unmodifiableList(scope_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.oauth.OAuthClient.internal_static_opencannabis_oauth_Client_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.oauth.OAuthClient.internal_static_opencannabis_oauth_Client_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.oauth.Client.class, io.opencannabis.schema.oauth.Client.Builder.class); } private int bitField0_; public static final int ID_FIELD_NUMBER = 1; private volatile java.lang.Object id_; /** *
   * ID for this OAuth2 client.
   * 
* * string id = 1; */ public java.lang.String getId() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } } /** *
   * ID for this OAuth2 client.
   * 
* * string id = 1; */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SECRET_FIELD_NUMBER = 2; private volatile java.lang.Object secret_; /** *
   * Secret (password) for this OAuth2 client.
   * 
* * string secret = 2; */ public java.lang.String getSecret() { java.lang.Object ref = secret_; 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(); secret_ = s; return s; } } /** *
   * Secret (password) for this OAuth2 client.
   * 
* * string secret = 2; */ public com.google.protobuf.ByteString getSecretBytes() { java.lang.Object ref = secret_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); secret_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int NAME_FIELD_NUMBER = 3; private volatile java.lang.Object name_; /** *
   * Name of the client.
   * 
* * string name = 3; */ 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; } } /** *
   * Name of the client.
   * 
* * string name = 3; */ 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 CONTACT_FIELD_NUMBER = 4; private com.google.protobuf.LazyStringList contact_; /** *
   * Contact information for the client.
   * 
* * repeated string contact = 4; */ public com.google.protobuf.ProtocolStringList getContactList() { return contact_; } /** *
   * Contact information for the client.
   * 
* * repeated string contact = 4; */ public int getContactCount() { return contact_.size(); } /** *
   * Contact information for the client.
   * 
* * repeated string contact = 4; */ public java.lang.String getContact(int index) { return contact_.get(index); } /** *
   * Contact information for the client.
   * 
* * repeated string contact = 4; */ public com.google.protobuf.ByteString getContactBytes(int index) { return contact_.getByteString(index); } public static final int GRANT_TYPES_FIELD_NUMBER = 5; private java.util.List grantTypes_; private static final com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, io.opencannabis.schema.oauth.GrantType> grantTypes_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, io.opencannabis.schema.oauth.GrantType>() { public io.opencannabis.schema.oauth.GrantType convert(java.lang.Integer from) { @SuppressWarnings("deprecation") io.opencannabis.schema.oauth.GrantType result = io.opencannabis.schema.oauth.GrantType.valueOf(from); return result == null ? io.opencannabis.schema.oauth.GrantType.UNRECOGNIZED : result; } }; /** *
   * Grant types supported by this client.
   * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public java.util.List getGrantTypesList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, io.opencannabis.schema.oauth.GrantType>(grantTypes_, grantTypes_converter_); } /** *
   * Grant types supported by this client.
   * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public int getGrantTypesCount() { return grantTypes_.size(); } /** *
   * Grant types supported by this client.
   * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public io.opencannabis.schema.oauth.GrantType getGrantTypes(int index) { return grantTypes_converter_.convert(grantTypes_.get(index)); } /** *
   * Grant types supported by this client.
   * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public java.util.List getGrantTypesValueList() { return grantTypes_; } /** *
   * Grant types supported by this client.
   * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public int getGrantTypesValue(int index) { return grantTypes_.get(index); } private int grantTypesMemoizedSerializedSize; public static final int BRANDING_FIELD_NUMBER = 6; private io.opencannabis.schema.media.AttachedMedia.MediaItem branding_; /** *
   * Attached media item for branding.
   * 
* * .opencannabis.media.MediaItem branding = 6; */ public boolean hasBranding() { return branding_ != null; } /** *
   * Attached media item for branding.
   * 
* * .opencannabis.media.MediaItem branding = 6; */ public io.opencannabis.schema.media.AttachedMedia.MediaItem getBranding() { return branding_ == null ? io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance() : branding_; } /** *
   * Attached media item for branding.
   * 
* * .opencannabis.media.MediaItem branding = 6; */ public io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder getBrandingOrBuilder() { return getBranding(); } public static final int OWNER_FIELD_NUMBER = 7; private volatile java.lang.Object owner_; /** *
   * Owner information for this client.
   * 
* * string owner = 7; */ public java.lang.String getOwner() { java.lang.Object ref = owner_; 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(); owner_ = s; return s; } } /** *
   * Owner information for this client.
   * 
* * string owner = 7; */ public com.google.protobuf.ByteString getOwnerBytes() { java.lang.Object ref = owner_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); owner_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int POLICY_FIELD_NUMBER = 8; private io.opencannabis.schema.media.AttachedMedia.MediaItem policy_; /** *
   * Privacy policy URI.
   * 
* * .opencannabis.media.MediaItem policy = 8; */ public boolean hasPolicy() { return policy_ != null; } /** *
   * Privacy policy URI.
   * 
* * .opencannabis.media.MediaItem policy = 8; */ public io.opencannabis.schema.media.AttachedMedia.MediaItem getPolicy() { return policy_ == null ? io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance() : policy_; } /** *
   * Privacy policy URI.
   * 
* * .opencannabis.media.MediaItem policy = 8; */ public io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder getPolicyOrBuilder() { return getPolicy(); } public static final int TERMS_FIELD_NUMBER = 9; private io.opencannabis.schema.media.AttachedMedia.MediaItem terms_; /** *
   * Terms of Service URI.
   * 
* * .opencannabis.media.MediaItem terms = 9; */ public boolean hasTerms() { return terms_ != null; } /** *
   * Terms of Service URI.
   * 
* * .opencannabis.media.MediaItem terms = 9; */ public io.opencannabis.schema.media.AttachedMedia.MediaItem getTerms() { return terms_ == null ? io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance() : terms_; } /** *
   * Terms of Service URI.
   * 
* * .opencannabis.media.MediaItem terms = 9; */ public io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder getTermsOrBuilder() { return getTerms(); } public static final int PUBLIC_FIELD_NUMBER = 10; private boolean public_; /** *
   * Whether this client is public or not.
   * 
* * bool public = 10; */ public boolean getPublic() { return public_; } public static final int REDIRECT_URI_FIELD_NUMBER = 11; private com.google.protobuf.LazyStringList redirectUri_; /** *
   * Supported/allowed redirect URIs for this client.
   * 
* * repeated string redirect_uri = 11; */ public com.google.protobuf.ProtocolStringList getRedirectUriList() { return redirectUri_; } /** *
   * Supported/allowed redirect URIs for this client.
   * 
* * repeated string redirect_uri = 11; */ public int getRedirectUriCount() { return redirectUri_.size(); } /** *
   * Supported/allowed redirect URIs for this client.
   * 
* * repeated string redirect_uri = 11; */ public java.lang.String getRedirectUri(int index) { return redirectUri_.get(index); } /** *
   * Supported/allowed redirect URIs for this client.
   * 
* * repeated string redirect_uri = 11; */ public com.google.protobuf.ByteString getRedirectUriBytes(int index) { return redirectUri_.getByteString(index); } public static final int RESPONSE_TYPE_FIELD_NUMBER = 12; private java.util.List responseType_; private static final com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, io.opencannabis.schema.oauth.ResponseType> responseType_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, io.opencannabis.schema.oauth.ResponseType>() { public io.opencannabis.schema.oauth.ResponseType convert(java.lang.Integer from) { @SuppressWarnings("deprecation") io.opencannabis.schema.oauth.ResponseType result = io.opencannabis.schema.oauth.ResponseType.valueOf(from); return result == null ? io.opencannabis.schema.oauth.ResponseType.UNRECOGNIZED : result; } }; /** *
   * Supported OAuth2 response types for this client.
   * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public java.util.List getResponseTypeList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, io.opencannabis.schema.oauth.ResponseType>(responseType_, responseType_converter_); } /** *
   * Supported OAuth2 response types for this client.
   * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public int getResponseTypeCount() { return responseType_.size(); } /** *
   * Supported OAuth2 response types for this client.
   * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public io.opencannabis.schema.oauth.ResponseType getResponseType(int index) { return responseType_converter_.convert(responseType_.get(index)); } /** *
   * Supported OAuth2 response types for this client.
   * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public java.util.List getResponseTypeValueList() { return responseType_; } /** *
   * Supported OAuth2 response types for this client.
   * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public int getResponseTypeValue(int index) { return responseType_.get(index); } private int responseTypeMemoizedSerializedSize; public static final int SCOPE_FIELD_NUMBER = 13; private java.util.List scope_; /** *
   * Allowed authorization scopes for this client.
   * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public java.util.List getScopeList() { return scope_; } /** *
   * Allowed authorization scopes for this client.
   * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public java.util.List getScopeOrBuilderList() { return scope_; } /** *
   * Allowed authorization scopes for this client.
   * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public int getScopeCount() { return scope_.size(); } /** *
   * Allowed authorization scopes for this client.
   * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public io.opencannabis.schema.oauth.AuthorizationScope getScope(int index) { return scope_.get(index); } /** *
   * Allowed authorization scopes for this client.
   * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public io.opencannabis.schema.oauth.AuthorizationScopeOrBuilder getScopeOrBuilder( int index) { return scope_.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 { getSerializedSize(); if (!getIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (!getSecretBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, secret_); } if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); } for (int i = 0; i < contact_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, contact_.getRaw(i)); } if (getGrantTypesList().size() > 0) { output.writeUInt32NoTag(42); output.writeUInt32NoTag(grantTypesMemoizedSerializedSize); } for (int i = 0; i < grantTypes_.size(); i++) { output.writeEnumNoTag(grantTypes_.get(i)); } if (branding_ != null) { output.writeMessage(6, getBranding()); } if (!getOwnerBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, owner_); } if (policy_ != null) { output.writeMessage(8, getPolicy()); } if (terms_ != null) { output.writeMessage(9, getTerms()); } if (public_ != false) { output.writeBool(10, public_); } for (int i = 0; i < redirectUri_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, redirectUri_.getRaw(i)); } if (getResponseTypeList().size() > 0) { output.writeUInt32NoTag(98); output.writeUInt32NoTag(responseTypeMemoizedSerializedSize); } for (int i = 0; i < responseType_.size(); i++) { output.writeEnumNoTag(responseType_.get(i)); } for (int i = 0; i < scope_.size(); i++) { output.writeMessage(13, scope_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } if (!getSecretBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, secret_); } if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); } { int dataSize = 0; for (int i = 0; i < contact_.size(); i++) { dataSize += computeStringSizeNoTag(contact_.getRaw(i)); } size += dataSize; size += 1 * getContactList().size(); } { int dataSize = 0; for (int i = 0; i < grantTypes_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeEnumSizeNoTag(grantTypes_.get(i)); } size += dataSize; if (!getGrantTypesList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(dataSize); }grantTypesMemoizedSerializedSize = dataSize; } if (branding_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getBranding()); } if (!getOwnerBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, owner_); } if (policy_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getPolicy()); } if (terms_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, getTerms()); } if (public_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(10, public_); } { int dataSize = 0; for (int i = 0; i < redirectUri_.size(); i++) { dataSize += computeStringSizeNoTag(redirectUri_.getRaw(i)); } size += dataSize; size += 1 * getRedirectUriList().size(); } { int dataSize = 0; for (int i = 0; i < responseType_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeEnumSizeNoTag(responseType_.get(i)); } size += dataSize; if (!getResponseTypeList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(dataSize); }responseTypeMemoizedSerializedSize = dataSize; } for (int i = 0; i < scope_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(13, scope_.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 io.opencannabis.schema.oauth.Client)) { return super.equals(obj); } io.opencannabis.schema.oauth.Client other = (io.opencannabis.schema.oauth.Client) obj; if (!getId() .equals(other.getId())) return false; if (!getSecret() .equals(other.getSecret())) return false; if (!getName() .equals(other.getName())) return false; if (!getContactList() .equals(other.getContactList())) return false; if (!grantTypes_.equals(other.grantTypes_)) return false; if (hasBranding() != other.hasBranding()) return false; if (hasBranding()) { if (!getBranding() .equals(other.getBranding())) return false; } if (!getOwner() .equals(other.getOwner())) return false; if (hasPolicy() != other.hasPolicy()) return false; if (hasPolicy()) { if (!getPolicy() .equals(other.getPolicy())) return false; } if (hasTerms() != other.hasTerms()) return false; if (hasTerms()) { if (!getTerms() .equals(other.getTerms())) return false; } if (getPublic() != other.getPublic()) return false; if (!getRedirectUriList() .equals(other.getRedirectUriList())) return false; if (!responseType_.equals(other.responseType_)) return false; if (!getScopeList() .equals(other.getScopeList())) 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().hashCode(); hash = (37 * hash) + SECRET_FIELD_NUMBER; hash = (53 * hash) + getSecret().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (getContactCount() > 0) { hash = (37 * hash) + CONTACT_FIELD_NUMBER; hash = (53 * hash) + getContactList().hashCode(); } if (getGrantTypesCount() > 0) { hash = (37 * hash) + GRANT_TYPES_FIELD_NUMBER; hash = (53 * hash) + grantTypes_.hashCode(); } if (hasBranding()) { hash = (37 * hash) + BRANDING_FIELD_NUMBER; hash = (53 * hash) + getBranding().hashCode(); } hash = (37 * hash) + OWNER_FIELD_NUMBER; hash = (53 * hash) + getOwner().hashCode(); if (hasPolicy()) { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } if (hasTerms()) { hash = (37 * hash) + TERMS_FIELD_NUMBER; hash = (53 * hash) + getTerms().hashCode(); } hash = (37 * hash) + PUBLIC_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getPublic()); if (getRedirectUriCount() > 0) { hash = (37 * hash) + REDIRECT_URI_FIELD_NUMBER; hash = (53 * hash) + getRedirectUriList().hashCode(); } if (getResponseTypeCount() > 0) { hash = (37 * hash) + RESPONSE_TYPE_FIELD_NUMBER; hash = (53 * hash) + responseType_.hashCode(); } if (getScopeCount() > 0) { hash = (37 * hash) + SCOPE_FIELD_NUMBER; hash = (53 * hash) + getScopeList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.opencannabis.schema.oauth.Client parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.oauth.Client parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.oauth.Client parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.oauth.Client parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.oauth.Client parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.oauth.Client parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.oauth.Client parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.oauth.Client parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static io.opencannabis.schema.oauth.Client parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opencannabis.schema.oauth.Client parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.opencannabis.schema.oauth.Client parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.oauth.Client parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.opencannabis.schema.oauth.Client 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; } /** *
   * Specifies an OAuth2-client that can perform authorization operations in certain circumstances.
   * 
* * Protobuf type {@code opencannabis.oauth.Client} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opencannabis.oauth.Client) io.opencannabis.schema.oauth.ClientOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.oauth.OAuthClient.internal_static_opencannabis_oauth_Client_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.oauth.OAuthClient.internal_static_opencannabis_oauth_Client_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.oauth.Client.class, io.opencannabis.schema.oauth.Client.Builder.class); } // Construct using io.opencannabis.schema.oauth.Client.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getScopeFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); id_ = ""; secret_ = ""; name_ = ""; contact_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); grantTypes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); if (brandingBuilder_ == null) { branding_ = null; } else { branding_ = null; brandingBuilder_ = null; } owner_ = ""; if (policyBuilder_ == null) { policy_ = null; } else { policy_ = null; policyBuilder_ = null; } if (termsBuilder_ == null) { terms_ = null; } else { terms_ = null; termsBuilder_ = null; } public_ = false; redirectUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000400); responseType_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000800); if (scopeBuilder_ == null) { scope_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00001000); } else { scopeBuilder_.clear(); } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.opencannabis.schema.oauth.OAuthClient.internal_static_opencannabis_oauth_Client_descriptor; } @java.lang.Override public io.opencannabis.schema.oauth.Client getDefaultInstanceForType() { return io.opencannabis.schema.oauth.Client.getDefaultInstance(); } @java.lang.Override public io.opencannabis.schema.oauth.Client build() { io.opencannabis.schema.oauth.Client result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opencannabis.schema.oauth.Client buildPartial() { io.opencannabis.schema.oauth.Client result = new io.opencannabis.schema.oauth.Client(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.id_ = id_; result.secret_ = secret_; result.name_ = name_; if (((bitField0_ & 0x00000008) != 0)) { contact_ = contact_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000008); } result.contact_ = contact_; if (((bitField0_ & 0x00000010) != 0)) { grantTypes_ = java.util.Collections.unmodifiableList(grantTypes_); bitField0_ = (bitField0_ & ~0x00000010); } result.grantTypes_ = grantTypes_; if (brandingBuilder_ == null) { result.branding_ = branding_; } else { result.branding_ = brandingBuilder_.build(); } result.owner_ = owner_; if (policyBuilder_ == null) { result.policy_ = policy_; } else { result.policy_ = policyBuilder_.build(); } if (termsBuilder_ == null) { result.terms_ = terms_; } else { result.terms_ = termsBuilder_.build(); } result.public_ = public_; if (((bitField0_ & 0x00000400) != 0)) { redirectUri_ = redirectUri_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000400); } result.redirectUri_ = redirectUri_; if (((bitField0_ & 0x00000800) != 0)) { responseType_ = java.util.Collections.unmodifiableList(responseType_); bitField0_ = (bitField0_ & ~0x00000800); } result.responseType_ = responseType_; if (scopeBuilder_ == null) { if (((bitField0_ & 0x00001000) != 0)) { scope_ = java.util.Collections.unmodifiableList(scope_); bitField0_ = (bitField0_ & ~0x00001000); } result.scope_ = scope_; } else { result.scope_ = scopeBuilder_.build(); } result.bitField0_ = to_bitField0_; 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 io.opencannabis.schema.oauth.Client) { return mergeFrom((io.opencannabis.schema.oauth.Client)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opencannabis.schema.oauth.Client other) { if (other == io.opencannabis.schema.oauth.Client.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } if (!other.getSecret().isEmpty()) { secret_ = other.secret_; onChanged(); } if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.contact_.isEmpty()) { if (contact_.isEmpty()) { contact_ = other.contact_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureContactIsMutable(); contact_.addAll(other.contact_); } onChanged(); } if (!other.grantTypes_.isEmpty()) { if (grantTypes_.isEmpty()) { grantTypes_ = other.grantTypes_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureGrantTypesIsMutable(); grantTypes_.addAll(other.grantTypes_); } onChanged(); } if (other.hasBranding()) { mergeBranding(other.getBranding()); } if (!other.getOwner().isEmpty()) { owner_ = other.owner_; onChanged(); } if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } if (other.hasTerms()) { mergeTerms(other.getTerms()); } if (other.getPublic() != false) { setPublic(other.getPublic()); } if (!other.redirectUri_.isEmpty()) { if (redirectUri_.isEmpty()) { redirectUri_ = other.redirectUri_; bitField0_ = (bitField0_ & ~0x00000400); } else { ensureRedirectUriIsMutable(); redirectUri_.addAll(other.redirectUri_); } onChanged(); } if (!other.responseType_.isEmpty()) { if (responseType_.isEmpty()) { responseType_ = other.responseType_; bitField0_ = (bitField0_ & ~0x00000800); } else { ensureResponseTypeIsMutable(); responseType_.addAll(other.responseType_); } onChanged(); } if (scopeBuilder_ == null) { if (!other.scope_.isEmpty()) { if (scope_.isEmpty()) { scope_ = other.scope_; bitField0_ = (bitField0_ & ~0x00001000); } else { ensureScopeIsMutable(); scope_.addAll(other.scope_); } onChanged(); } } else { if (!other.scope_.isEmpty()) { if (scopeBuilder_.isEmpty()) { scopeBuilder_.dispose(); scopeBuilder_ = null; scope_ = other.scope_; bitField0_ = (bitField0_ & ~0x00001000); scopeBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getScopeFieldBuilder() : null; } else { scopeBuilder_.addAllMessages(other.scope_); } } } 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 { io.opencannabis.schema.oauth.Client parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opencannabis.schema.oauth.Client) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object id_ = ""; /** *
     * ID for this OAuth2 client.
     * 
* * string id = 1; */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * ID for this OAuth2 client.
     * 
* * string id = 1; */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * ID for this OAuth2 client.
     * 
* * string id = 1; */ public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; onChanged(); return this; } /** *
     * ID for this OAuth2 client.
     * 
* * string id = 1; */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /** *
     * ID for this OAuth2 client.
     * 
* * string id = 1; */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; onChanged(); return this; } private java.lang.Object secret_ = ""; /** *
     * Secret (password) for this OAuth2 client.
     * 
* * string secret = 2; */ public java.lang.String getSecret() { java.lang.Object ref = secret_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); secret_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Secret (password) for this OAuth2 client.
     * 
* * string secret = 2; */ public com.google.protobuf.ByteString getSecretBytes() { java.lang.Object ref = secret_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); secret_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Secret (password) for this OAuth2 client.
     * 
* * string secret = 2; */ public Builder setSecret( java.lang.String value) { if (value == null) { throw new NullPointerException(); } secret_ = value; onChanged(); return this; } /** *
     * Secret (password) for this OAuth2 client.
     * 
* * string secret = 2; */ public Builder clearSecret() { secret_ = getDefaultInstance().getSecret(); onChanged(); return this; } /** *
     * Secret (password) for this OAuth2 client.
     * 
* * string secret = 2; */ public Builder setSecretBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); secret_ = value; onChanged(); return this; } private java.lang.Object name_ = ""; /** *
     * Name of the client.
     * 
* * string name = 3; */ 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; } } /** *
     * Name of the client.
     * 
* * string name = 3; */ 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; } } /** *
     * Name of the client.
     * 
* * string name = 3; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
     * Name of the client.
     * 
* * string name = 3; */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
     * Name of the client.
     * 
* * string name = 3; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private com.google.protobuf.LazyStringList contact_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureContactIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { contact_ = new com.google.protobuf.LazyStringArrayList(contact_); bitField0_ |= 0x00000008; } } /** *
     * Contact information for the client.
     * 
* * repeated string contact = 4; */ public com.google.protobuf.ProtocolStringList getContactList() { return contact_.getUnmodifiableView(); } /** *
     * Contact information for the client.
     * 
* * repeated string contact = 4; */ public int getContactCount() { return contact_.size(); } /** *
     * Contact information for the client.
     * 
* * repeated string contact = 4; */ public java.lang.String getContact(int index) { return contact_.get(index); } /** *
     * Contact information for the client.
     * 
* * repeated string contact = 4; */ public com.google.protobuf.ByteString getContactBytes(int index) { return contact_.getByteString(index); } /** *
     * Contact information for the client.
     * 
* * repeated string contact = 4; */ public Builder setContact( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureContactIsMutable(); contact_.set(index, value); onChanged(); return this; } /** *
     * Contact information for the client.
     * 
* * repeated string contact = 4; */ public Builder addContact( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureContactIsMutable(); contact_.add(value); onChanged(); return this; } /** *
     * Contact information for the client.
     * 
* * repeated string contact = 4; */ public Builder addAllContact( java.lang.Iterable values) { ensureContactIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, contact_); onChanged(); return this; } /** *
     * Contact information for the client.
     * 
* * repeated string contact = 4; */ public Builder clearContact() { contact_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** *
     * Contact information for the client.
     * 
* * repeated string contact = 4; */ public Builder addContactBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureContactIsMutable(); contact_.add(value); onChanged(); return this; } private java.util.List grantTypes_ = java.util.Collections.emptyList(); private void ensureGrantTypesIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { grantTypes_ = new java.util.ArrayList(grantTypes_); bitField0_ |= 0x00000010; } } /** *
     * Grant types supported by this client.
     * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public java.util.List getGrantTypesList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, io.opencannabis.schema.oauth.GrantType>(grantTypes_, grantTypes_converter_); } /** *
     * Grant types supported by this client.
     * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public int getGrantTypesCount() { return grantTypes_.size(); } /** *
     * Grant types supported by this client.
     * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public io.opencannabis.schema.oauth.GrantType getGrantTypes(int index) { return grantTypes_converter_.convert(grantTypes_.get(index)); } /** *
     * Grant types supported by this client.
     * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public Builder setGrantTypes( int index, io.opencannabis.schema.oauth.GrantType value) { if (value == null) { throw new NullPointerException(); } ensureGrantTypesIsMutable(); grantTypes_.set(index, value.getNumber()); onChanged(); return this; } /** *
     * Grant types supported by this client.
     * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public Builder addGrantTypes(io.opencannabis.schema.oauth.GrantType value) { if (value == null) { throw new NullPointerException(); } ensureGrantTypesIsMutable(); grantTypes_.add(value.getNumber()); onChanged(); return this; } /** *
     * Grant types supported by this client.
     * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public Builder addAllGrantTypes( java.lang.Iterable values) { ensureGrantTypesIsMutable(); for (io.opencannabis.schema.oauth.GrantType value : values) { grantTypes_.add(value.getNumber()); } onChanged(); return this; } /** *
     * Grant types supported by this client.
     * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public Builder clearGrantTypes() { grantTypes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** *
     * Grant types supported by this client.
     * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public java.util.List getGrantTypesValueList() { return java.util.Collections.unmodifiableList(grantTypes_); } /** *
     * Grant types supported by this client.
     * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public int getGrantTypesValue(int index) { return grantTypes_.get(index); } /** *
     * Grant types supported by this client.
     * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public Builder setGrantTypesValue( int index, int value) { ensureGrantTypesIsMutable(); grantTypes_.set(index, value); onChanged(); return this; } /** *
     * Grant types supported by this client.
     * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public Builder addGrantTypesValue(int value) { ensureGrantTypesIsMutable(); grantTypes_.add(value); onChanged(); return this; } /** *
     * Grant types supported by this client.
     * 
* * repeated .opencannabis.oauth.GrantType grant_types = 5; */ public Builder addAllGrantTypesValue( java.lang.Iterable values) { ensureGrantTypesIsMutable(); for (int value : values) { grantTypes_.add(value); } onChanged(); return this; } private io.opencannabis.schema.media.AttachedMedia.MediaItem branding_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.AttachedMedia.MediaItem, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder, io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder> brandingBuilder_; /** *
     * Attached media item for branding.
     * 
* * .opencannabis.media.MediaItem branding = 6; */ public boolean hasBranding() { return brandingBuilder_ != null || branding_ != null; } /** *
     * Attached media item for branding.
     * 
* * .opencannabis.media.MediaItem branding = 6; */ public io.opencannabis.schema.media.AttachedMedia.MediaItem getBranding() { if (brandingBuilder_ == null) { return branding_ == null ? io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance() : branding_; } else { return brandingBuilder_.getMessage(); } } /** *
     * Attached media item for branding.
     * 
* * .opencannabis.media.MediaItem branding = 6; */ public Builder setBranding(io.opencannabis.schema.media.AttachedMedia.MediaItem value) { if (brandingBuilder_ == null) { if (value == null) { throw new NullPointerException(); } branding_ = value; onChanged(); } else { brandingBuilder_.setMessage(value); } return this; } /** *
     * Attached media item for branding.
     * 
* * .opencannabis.media.MediaItem branding = 6; */ public Builder setBranding( io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder builderForValue) { if (brandingBuilder_ == null) { branding_ = builderForValue.build(); onChanged(); } else { brandingBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Attached media item for branding.
     * 
* * .opencannabis.media.MediaItem branding = 6; */ public Builder mergeBranding(io.opencannabis.schema.media.AttachedMedia.MediaItem value) { if (brandingBuilder_ == null) { if (branding_ != null) { branding_ = io.opencannabis.schema.media.AttachedMedia.MediaItem.newBuilder(branding_).mergeFrom(value).buildPartial(); } else { branding_ = value; } onChanged(); } else { brandingBuilder_.mergeFrom(value); } return this; } /** *
     * Attached media item for branding.
     * 
* * .opencannabis.media.MediaItem branding = 6; */ public Builder clearBranding() { if (brandingBuilder_ == null) { branding_ = null; onChanged(); } else { branding_ = null; brandingBuilder_ = null; } return this; } /** *
     * Attached media item for branding.
     * 
* * .opencannabis.media.MediaItem branding = 6; */ public io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder getBrandingBuilder() { onChanged(); return getBrandingFieldBuilder().getBuilder(); } /** *
     * Attached media item for branding.
     * 
* * .opencannabis.media.MediaItem branding = 6; */ public io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder getBrandingOrBuilder() { if (brandingBuilder_ != null) { return brandingBuilder_.getMessageOrBuilder(); } else { return branding_ == null ? io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance() : branding_; } } /** *
     * Attached media item for branding.
     * 
* * .opencannabis.media.MediaItem branding = 6; */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.AttachedMedia.MediaItem, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder, io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder> getBrandingFieldBuilder() { if (brandingBuilder_ == null) { brandingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.AttachedMedia.MediaItem, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder, io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder>( getBranding(), getParentForChildren(), isClean()); branding_ = null; } return brandingBuilder_; } private java.lang.Object owner_ = ""; /** *
     * Owner information for this client.
     * 
* * string owner = 7; */ public java.lang.String getOwner() { java.lang.Object ref = owner_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); owner_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Owner information for this client.
     * 
* * string owner = 7; */ public com.google.protobuf.ByteString getOwnerBytes() { java.lang.Object ref = owner_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); owner_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Owner information for this client.
     * 
* * string owner = 7; */ public Builder setOwner( java.lang.String value) { if (value == null) { throw new NullPointerException(); } owner_ = value; onChanged(); return this; } /** *
     * Owner information for this client.
     * 
* * string owner = 7; */ public Builder clearOwner() { owner_ = getDefaultInstance().getOwner(); onChanged(); return this; } /** *
     * Owner information for this client.
     * 
* * string owner = 7; */ public Builder setOwnerBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); owner_ = value; onChanged(); return this; } private io.opencannabis.schema.media.AttachedMedia.MediaItem policy_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.AttachedMedia.MediaItem, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder, io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder> policyBuilder_; /** *
     * Privacy policy URI.
     * 
* * .opencannabis.media.MediaItem policy = 8; */ public boolean hasPolicy() { return policyBuilder_ != null || policy_ != null; } /** *
     * Privacy policy URI.
     * 
* * .opencannabis.media.MediaItem policy = 8; */ public io.opencannabis.schema.media.AttachedMedia.MediaItem getPolicy() { if (policyBuilder_ == null) { return policy_ == null ? io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance() : policy_; } else { return policyBuilder_.getMessage(); } } /** *
     * Privacy policy URI.
     * 
* * .opencannabis.media.MediaItem policy = 8; */ public Builder setPolicy(io.opencannabis.schema.media.AttachedMedia.MediaItem value) { if (policyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } policy_ = value; onChanged(); } else { policyBuilder_.setMessage(value); } return this; } /** *
     * Privacy policy URI.
     * 
* * .opencannabis.media.MediaItem policy = 8; */ public Builder setPolicy( io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder builderForValue) { if (policyBuilder_ == null) { policy_ = builderForValue.build(); onChanged(); } else { policyBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Privacy policy URI.
     * 
* * .opencannabis.media.MediaItem policy = 8; */ public Builder mergePolicy(io.opencannabis.schema.media.AttachedMedia.MediaItem value) { if (policyBuilder_ == null) { if (policy_ != null) { policy_ = io.opencannabis.schema.media.AttachedMedia.MediaItem.newBuilder(policy_).mergeFrom(value).buildPartial(); } else { policy_ = value; } onChanged(); } else { policyBuilder_.mergeFrom(value); } return this; } /** *
     * Privacy policy URI.
     * 
* * .opencannabis.media.MediaItem policy = 8; */ public Builder clearPolicy() { if (policyBuilder_ == null) { policy_ = null; onChanged(); } else { policy_ = null; policyBuilder_ = null; } return this; } /** *
     * Privacy policy URI.
     * 
* * .opencannabis.media.MediaItem policy = 8; */ public io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder getPolicyBuilder() { onChanged(); return getPolicyFieldBuilder().getBuilder(); } /** *
     * Privacy policy URI.
     * 
* * .opencannabis.media.MediaItem policy = 8; */ public io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder getPolicyOrBuilder() { if (policyBuilder_ != null) { return policyBuilder_.getMessageOrBuilder(); } else { return policy_ == null ? io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance() : policy_; } } /** *
     * Privacy policy URI.
     * 
* * .opencannabis.media.MediaItem policy = 8; */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.AttachedMedia.MediaItem, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder, io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder> getPolicyFieldBuilder() { if (policyBuilder_ == null) { policyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.AttachedMedia.MediaItem, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder, io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder>( getPolicy(), getParentForChildren(), isClean()); policy_ = null; } return policyBuilder_; } private io.opencannabis.schema.media.AttachedMedia.MediaItem terms_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.AttachedMedia.MediaItem, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder, io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder> termsBuilder_; /** *
     * Terms of Service URI.
     * 
* * .opencannabis.media.MediaItem terms = 9; */ public boolean hasTerms() { return termsBuilder_ != null || terms_ != null; } /** *
     * Terms of Service URI.
     * 
* * .opencannabis.media.MediaItem terms = 9; */ public io.opencannabis.schema.media.AttachedMedia.MediaItem getTerms() { if (termsBuilder_ == null) { return terms_ == null ? io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance() : terms_; } else { return termsBuilder_.getMessage(); } } /** *
     * Terms of Service URI.
     * 
* * .opencannabis.media.MediaItem terms = 9; */ public Builder setTerms(io.opencannabis.schema.media.AttachedMedia.MediaItem value) { if (termsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } terms_ = value; onChanged(); } else { termsBuilder_.setMessage(value); } return this; } /** *
     * Terms of Service URI.
     * 
* * .opencannabis.media.MediaItem terms = 9; */ public Builder setTerms( io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder builderForValue) { if (termsBuilder_ == null) { terms_ = builderForValue.build(); onChanged(); } else { termsBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Terms of Service URI.
     * 
* * .opencannabis.media.MediaItem terms = 9; */ public Builder mergeTerms(io.opencannabis.schema.media.AttachedMedia.MediaItem value) { if (termsBuilder_ == null) { if (terms_ != null) { terms_ = io.opencannabis.schema.media.AttachedMedia.MediaItem.newBuilder(terms_).mergeFrom(value).buildPartial(); } else { terms_ = value; } onChanged(); } else { termsBuilder_.mergeFrom(value); } return this; } /** *
     * Terms of Service URI.
     * 
* * .opencannabis.media.MediaItem terms = 9; */ public Builder clearTerms() { if (termsBuilder_ == null) { terms_ = null; onChanged(); } else { terms_ = null; termsBuilder_ = null; } return this; } /** *
     * Terms of Service URI.
     * 
* * .opencannabis.media.MediaItem terms = 9; */ public io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder getTermsBuilder() { onChanged(); return getTermsFieldBuilder().getBuilder(); } /** *
     * Terms of Service URI.
     * 
* * .opencannabis.media.MediaItem terms = 9; */ public io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder getTermsOrBuilder() { if (termsBuilder_ != null) { return termsBuilder_.getMessageOrBuilder(); } else { return terms_ == null ? io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance() : terms_; } } /** *
     * Terms of Service URI.
     * 
* * .opencannabis.media.MediaItem terms = 9; */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.AttachedMedia.MediaItem, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder, io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder> getTermsFieldBuilder() { if (termsBuilder_ == null) { termsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.AttachedMedia.MediaItem, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder, io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder>( getTerms(), getParentForChildren(), isClean()); terms_ = null; } return termsBuilder_; } private boolean public_ ; /** *
     * Whether this client is public or not.
     * 
* * bool public = 10; */ public boolean getPublic() { return public_; } /** *
     * Whether this client is public or not.
     * 
* * bool public = 10; */ public Builder setPublic(boolean value) { public_ = value; onChanged(); return this; } /** *
     * Whether this client is public or not.
     * 
* * bool public = 10; */ public Builder clearPublic() { public_ = false; onChanged(); return this; } private com.google.protobuf.LazyStringList redirectUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureRedirectUriIsMutable() { if (!((bitField0_ & 0x00000400) != 0)) { redirectUri_ = new com.google.protobuf.LazyStringArrayList(redirectUri_); bitField0_ |= 0x00000400; } } /** *
     * Supported/allowed redirect URIs for this client.
     * 
* * repeated string redirect_uri = 11; */ public com.google.protobuf.ProtocolStringList getRedirectUriList() { return redirectUri_.getUnmodifiableView(); } /** *
     * Supported/allowed redirect URIs for this client.
     * 
* * repeated string redirect_uri = 11; */ public int getRedirectUriCount() { return redirectUri_.size(); } /** *
     * Supported/allowed redirect URIs for this client.
     * 
* * repeated string redirect_uri = 11; */ public java.lang.String getRedirectUri(int index) { return redirectUri_.get(index); } /** *
     * Supported/allowed redirect URIs for this client.
     * 
* * repeated string redirect_uri = 11; */ public com.google.protobuf.ByteString getRedirectUriBytes(int index) { return redirectUri_.getByteString(index); } /** *
     * Supported/allowed redirect URIs for this client.
     * 
* * repeated string redirect_uri = 11; */ public Builder setRedirectUri( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureRedirectUriIsMutable(); redirectUri_.set(index, value); onChanged(); return this; } /** *
     * Supported/allowed redirect URIs for this client.
     * 
* * repeated string redirect_uri = 11; */ public Builder addRedirectUri( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureRedirectUriIsMutable(); redirectUri_.add(value); onChanged(); return this; } /** *
     * Supported/allowed redirect URIs for this client.
     * 
* * repeated string redirect_uri = 11; */ public Builder addAllRedirectUri( java.lang.Iterable values) { ensureRedirectUriIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, redirectUri_); onChanged(); return this; } /** *
     * Supported/allowed redirect URIs for this client.
     * 
* * repeated string redirect_uri = 11; */ public Builder clearRedirectUri() { redirectUri_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } /** *
     * Supported/allowed redirect URIs for this client.
     * 
* * repeated string redirect_uri = 11; */ public Builder addRedirectUriBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureRedirectUriIsMutable(); redirectUri_.add(value); onChanged(); return this; } private java.util.List responseType_ = java.util.Collections.emptyList(); private void ensureResponseTypeIsMutable() { if (!((bitField0_ & 0x00000800) != 0)) { responseType_ = new java.util.ArrayList(responseType_); bitField0_ |= 0x00000800; } } /** *
     * Supported OAuth2 response types for this client.
     * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public java.util.List getResponseTypeList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, io.opencannabis.schema.oauth.ResponseType>(responseType_, responseType_converter_); } /** *
     * Supported OAuth2 response types for this client.
     * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public int getResponseTypeCount() { return responseType_.size(); } /** *
     * Supported OAuth2 response types for this client.
     * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public io.opencannabis.schema.oauth.ResponseType getResponseType(int index) { return responseType_converter_.convert(responseType_.get(index)); } /** *
     * Supported OAuth2 response types for this client.
     * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public Builder setResponseType( int index, io.opencannabis.schema.oauth.ResponseType value) { if (value == null) { throw new NullPointerException(); } ensureResponseTypeIsMutable(); responseType_.set(index, value.getNumber()); onChanged(); return this; } /** *
     * Supported OAuth2 response types for this client.
     * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public Builder addResponseType(io.opencannabis.schema.oauth.ResponseType value) { if (value == null) { throw new NullPointerException(); } ensureResponseTypeIsMutable(); responseType_.add(value.getNumber()); onChanged(); return this; } /** *
     * Supported OAuth2 response types for this client.
     * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public Builder addAllResponseType( java.lang.Iterable values) { ensureResponseTypeIsMutable(); for (io.opencannabis.schema.oauth.ResponseType value : values) { responseType_.add(value.getNumber()); } onChanged(); return this; } /** *
     * Supported OAuth2 response types for this client.
     * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public Builder clearResponseType() { responseType_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } /** *
     * Supported OAuth2 response types for this client.
     * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public java.util.List getResponseTypeValueList() { return java.util.Collections.unmodifiableList(responseType_); } /** *
     * Supported OAuth2 response types for this client.
     * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public int getResponseTypeValue(int index) { return responseType_.get(index); } /** *
     * Supported OAuth2 response types for this client.
     * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public Builder setResponseTypeValue( int index, int value) { ensureResponseTypeIsMutable(); responseType_.set(index, value); onChanged(); return this; } /** *
     * Supported OAuth2 response types for this client.
     * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public Builder addResponseTypeValue(int value) { ensureResponseTypeIsMutable(); responseType_.add(value); onChanged(); return this; } /** *
     * Supported OAuth2 response types for this client.
     * 
* * repeated .opencannabis.oauth.ResponseType response_type = 12; */ public Builder addAllResponseTypeValue( java.lang.Iterable values) { ensureResponseTypeIsMutable(); for (int value : values) { responseType_.add(value); } onChanged(); return this; } private java.util.List scope_ = java.util.Collections.emptyList(); private void ensureScopeIsMutable() { if (!((bitField0_ & 0x00001000) != 0)) { scope_ = new java.util.ArrayList(scope_); bitField0_ |= 0x00001000; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.opencannabis.schema.oauth.AuthorizationScope, io.opencannabis.schema.oauth.AuthorizationScope.Builder, io.opencannabis.schema.oauth.AuthorizationScopeOrBuilder> scopeBuilder_; /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public java.util.List getScopeList() { if (scopeBuilder_ == null) { return java.util.Collections.unmodifiableList(scope_); } else { return scopeBuilder_.getMessageList(); } } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public int getScopeCount() { if (scopeBuilder_ == null) { return scope_.size(); } else { return scopeBuilder_.getCount(); } } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public io.opencannabis.schema.oauth.AuthorizationScope getScope(int index) { if (scopeBuilder_ == null) { return scope_.get(index); } else { return scopeBuilder_.getMessage(index); } } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public Builder setScope( int index, io.opencannabis.schema.oauth.AuthorizationScope value) { if (scopeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureScopeIsMutable(); scope_.set(index, value); onChanged(); } else { scopeBuilder_.setMessage(index, value); } return this; } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public Builder setScope( int index, io.opencannabis.schema.oauth.AuthorizationScope.Builder builderForValue) { if (scopeBuilder_ == null) { ensureScopeIsMutable(); scope_.set(index, builderForValue.build()); onChanged(); } else { scopeBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public Builder addScope(io.opencannabis.schema.oauth.AuthorizationScope value) { if (scopeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureScopeIsMutable(); scope_.add(value); onChanged(); } else { scopeBuilder_.addMessage(value); } return this; } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public Builder addScope( int index, io.opencannabis.schema.oauth.AuthorizationScope value) { if (scopeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureScopeIsMutable(); scope_.add(index, value); onChanged(); } else { scopeBuilder_.addMessage(index, value); } return this; } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public Builder addScope( io.opencannabis.schema.oauth.AuthorizationScope.Builder builderForValue) { if (scopeBuilder_ == null) { ensureScopeIsMutable(); scope_.add(builderForValue.build()); onChanged(); } else { scopeBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public Builder addScope( int index, io.opencannabis.schema.oauth.AuthorizationScope.Builder builderForValue) { if (scopeBuilder_ == null) { ensureScopeIsMutable(); scope_.add(index, builderForValue.build()); onChanged(); } else { scopeBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public Builder addAllScope( java.lang.Iterable values) { if (scopeBuilder_ == null) { ensureScopeIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, scope_); onChanged(); } else { scopeBuilder_.addAllMessages(values); } return this; } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public Builder clearScope() { if (scopeBuilder_ == null) { scope_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00001000); onChanged(); } else { scopeBuilder_.clear(); } return this; } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public Builder removeScope(int index) { if (scopeBuilder_ == null) { ensureScopeIsMutable(); scope_.remove(index); onChanged(); } else { scopeBuilder_.remove(index); } return this; } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public io.opencannabis.schema.oauth.AuthorizationScope.Builder getScopeBuilder( int index) { return getScopeFieldBuilder().getBuilder(index); } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public io.opencannabis.schema.oauth.AuthorizationScopeOrBuilder getScopeOrBuilder( int index) { if (scopeBuilder_ == null) { return scope_.get(index); } else { return scopeBuilder_.getMessageOrBuilder(index); } } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public java.util.List getScopeOrBuilderList() { if (scopeBuilder_ != null) { return scopeBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(scope_); } } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public io.opencannabis.schema.oauth.AuthorizationScope.Builder addScopeBuilder() { return getScopeFieldBuilder().addBuilder( io.opencannabis.schema.oauth.AuthorizationScope.getDefaultInstance()); } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public io.opencannabis.schema.oauth.AuthorizationScope.Builder addScopeBuilder( int index) { return getScopeFieldBuilder().addBuilder( index, io.opencannabis.schema.oauth.AuthorizationScope.getDefaultInstance()); } /** *
     * Allowed authorization scopes for this client.
     * 
* * repeated .opencannabis.oauth.AuthorizationScope scope = 13; */ public java.util.List getScopeBuilderList() { return getScopeFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.opencannabis.schema.oauth.AuthorizationScope, io.opencannabis.schema.oauth.AuthorizationScope.Builder, io.opencannabis.schema.oauth.AuthorizationScopeOrBuilder> getScopeFieldBuilder() { if (scopeBuilder_ == null) { scopeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.opencannabis.schema.oauth.AuthorizationScope, io.opencannabis.schema.oauth.AuthorizationScope.Builder, io.opencannabis.schema.oauth.AuthorizationScopeOrBuilder>( scope_, ((bitField0_ & 0x00001000) != 0), getParentForChildren(), isClean()); scope_ = null; } return scopeBuilder_; } @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:opencannabis.oauth.Client) } // @@protoc_insertion_point(class_scope:opencannabis.oauth.Client) private static final io.opencannabis.schema.oauth.Client DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opencannabis.schema.oauth.Client(); } public static io.opencannabis.schema.oauth.Client getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Client parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Client(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 io.opencannabis.schema.oauth.Client getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy