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

com.google.protobuf.Mixin Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/protobuf/api.proto

package com.google.protobuf;

/**
 * 
 * Declares an API Interface to be included in this interface. The including
 * interface must redeclare all the methods from the included interface, but
 * documentation and options are inherited as follows:
 * - If after comment and whitespace stripping, the documentation
 *   string of the redeclared method is empty, it will be inherited
 *   from the original method.
 * - Each annotation belonging to the service config (http,
 *   visibility) which is not set in the redeclared method will be
 *   inherited.
 * - If an http annotation is inherited, the path pattern will be
 *   modified as follows. Any version prefix will be replaced by the
 *   version of the including interface plus the [root][] path if
 *   specified.
 * Example of a simple mixin:
 *     package google.acl.v1;
 *     service AccessControl {
 *       // Get the underlying ACL object.
 *       rpc GetAcl(GetAclRequest) returns (Acl) {
 *         option (google.api.http).get = "/v1/{resource=**}:getAcl";
 *       }
 *     }
 *     package google.storage.v2;
 *     service Storage {
 *       rpc GetAcl(GetAclRequest) returns (Acl);
 *       // Get a data record.
 *       rpc GetData(GetDataRequest) returns (Data) {
 *         option (google.api.http).get = "/v2/{resource=**}";
 *       }
 *     }
 * Example of a mixin configuration:
 *     apis:
 *     - name: google.storage.v2.Storage
 *       mixins:
 *       - name: google.acl.v1.AccessControl
 * The mixin construct implies that all methods in `AccessControl` are
 * also declared with same name and request/response types in
 * `Storage`. A documentation generator or annotation processor will
 * see the effective `Storage.GetAcl` method after inherting
 * documentation and annotations as follows:
 *     service Storage {
 *       // Get the underlying ACL object.
 *       rpc GetAcl(GetAclRequest) returns (Acl) {
 *         option (google.api.http).get = "/v2/{resource=**}:getAcl";
 *       }
 *       ...
 *     }
 * Note how the version in the path pattern changed from `v1` to `v2`.
 * If the `root` field in the mixin is specified, it should be a
 * relative path under which inherited HTTP paths are placed. Example:
 *     apis:
 *     - name: google.storage.v2.Storage
 *       mixins:
 *       - name: google.acl.v1.AccessControl
 *         root: acls
 * This implies the following inherited HTTP annotation:
 *     service Storage {
 *       // Get the underlying ACL object.
 *       rpc GetAcl(GetAclRequest) returns (Acl) {
 *         option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
 *       }
 *       ...
 *     }
 * 
* * Protobuf type {@code google.protobuf.Mixin} */ public final class Mixin extends com.google.protobuf.GeneratedMessageLite< Mixin, Mixin.Builder> implements // @@protoc_insertion_point(message_implements:google.protobuf.Mixin) MixinOrBuilder { private Mixin() { name_ = ""; root_ = ""; } public static final int NAME_FIELD_NUMBER = 1; private java.lang.String name_; /** *
   * The fully qualified name of the interface which is included.
   * 
* * string name = 1; */ @java.lang.Override public java.lang.String getName() { return name_; } /** *
   * The fully qualified name of the interface which is included.
   * 
* * string name = 1; */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { return com.google.protobuf.ByteString.copyFromUtf8(name_); } /** *
   * The fully qualified name of the interface which is included.
   * 
* * string name = 1; */ private void setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; } /** *
   * The fully qualified name of the interface which is included.
   * 
* * string name = 1; */ private void clearName() { name_ = getDefaultInstance().getName(); } /** *
   * The fully qualified name of the interface which is included.
   * 
* * string name = 1; */ private void setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value.toStringUtf8(); } public static final int ROOT_FIELD_NUMBER = 2; private java.lang.String root_; /** *
   * If non-empty specifies a path under which inherited HTTP paths
   * are rooted.
   * 
* * string root = 2; */ @java.lang.Override public java.lang.String getRoot() { return root_; } /** *
   * If non-empty specifies a path under which inherited HTTP paths
   * are rooted.
   * 
* * string root = 2; */ @java.lang.Override public com.google.protobuf.ByteString getRootBytes() { return com.google.protobuf.ByteString.copyFromUtf8(root_); } /** *
   * If non-empty specifies a path under which inherited HTTP paths
   * are rooted.
   * 
* * string root = 2; */ private void setRoot( java.lang.String value) { if (value == null) { throw new NullPointerException(); } root_ = value; } /** *
   * If non-empty specifies a path under which inherited HTTP paths
   * are rooted.
   * 
* * string root = 2; */ private void clearRoot() { root_ = getDefaultInstance().getRoot(); } /** *
   * If non-empty specifies a path under which inherited HTTP paths
   * are rooted.
   * 
* * string root = 2; */ private void setRootBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); root_ = value.toStringUtf8(); } public static com.google.protobuf.Mixin parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.google.protobuf.Mixin parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.google.protobuf.Mixin parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.google.protobuf.Mixin parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.google.protobuf.Mixin parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.google.protobuf.Mixin parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.google.protobuf.Mixin parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.google.protobuf.Mixin parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static com.google.protobuf.Mixin parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static com.google.protobuf.Mixin parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static com.google.protobuf.Mixin parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.google.protobuf.Mixin parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static Builder newBuilder() { return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(com.google.protobuf.Mixin prototype) { return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } /** *
   * Declares an API Interface to be included in this interface. The including
   * interface must redeclare all the methods from the included interface, but
   * documentation and options are inherited as follows:
   * - If after comment and whitespace stripping, the documentation
   *   string of the redeclared method is empty, it will be inherited
   *   from the original method.
   * - Each annotation belonging to the service config (http,
   *   visibility) which is not set in the redeclared method will be
   *   inherited.
   * - If an http annotation is inherited, the path pattern will be
   *   modified as follows. Any version prefix will be replaced by the
   *   version of the including interface plus the [root][] path if
   *   specified.
   * Example of a simple mixin:
   *     package google.acl.v1;
   *     service AccessControl {
   *       // Get the underlying ACL object.
   *       rpc GetAcl(GetAclRequest) returns (Acl) {
   *         option (google.api.http).get = "/v1/{resource=**}:getAcl";
   *       }
   *     }
   *     package google.storage.v2;
   *     service Storage {
   *       rpc GetAcl(GetAclRequest) returns (Acl);
   *       // Get a data record.
   *       rpc GetData(GetDataRequest) returns (Data) {
   *         option (google.api.http).get = "/v2/{resource=**}";
   *       }
   *     }
   * Example of a mixin configuration:
   *     apis:
   *     - name: google.storage.v2.Storage
   *       mixins:
   *       - name: google.acl.v1.AccessControl
   * The mixin construct implies that all methods in `AccessControl` are
   * also declared with same name and request/response types in
   * `Storage`. A documentation generator or annotation processor will
   * see the effective `Storage.GetAcl` method after inherting
   * documentation and annotations as follows:
   *     service Storage {
   *       // Get the underlying ACL object.
   *       rpc GetAcl(GetAclRequest) returns (Acl) {
   *         option (google.api.http).get = "/v2/{resource=**}:getAcl";
   *       }
   *       ...
   *     }
   * Note how the version in the path pattern changed from `v1` to `v2`.
   * If the `root` field in the mixin is specified, it should be a
   * relative path under which inherited HTTP paths are placed. Example:
   *     apis:
   *     - name: google.storage.v2.Storage
   *       mixins:
   *       - name: google.acl.v1.AccessControl
   *         root: acls
   * This implies the following inherited HTTP annotation:
   *     service Storage {
   *       // Get the underlying ACL object.
   *       rpc GetAcl(GetAclRequest) returns (Acl) {
   *         option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
   *       }
   *       ...
   *     }
   * 
* * Protobuf type {@code google.protobuf.Mixin} */ public static final class Builder extends com.google.protobuf.GeneratedMessageLite.Builder< com.google.protobuf.Mixin, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.Mixin) com.google.protobuf.MixinOrBuilder { // Construct using com.google.protobuf.Mixin.newBuilder() private Builder() { super(DEFAULT_INSTANCE); } /** *
     * The fully qualified name of the interface which is included.
     * 
* * string name = 1; */ @java.lang.Override public java.lang.String getName() { return instance.getName(); } /** *
     * The fully qualified name of the interface which is included.
     * 
* * string name = 1; */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { return instance.getNameBytes(); } /** *
     * The fully qualified name of the interface which is included.
     * 
* * string name = 1; */ public Builder setName( java.lang.String value) { copyOnWrite(); instance.setName(value); return this; } /** *
     * The fully qualified name of the interface which is included.
     * 
* * string name = 1; */ public Builder clearName() { copyOnWrite(); instance.clearName(); return this; } /** *
     * The fully qualified name of the interface which is included.
     * 
* * string name = 1; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { copyOnWrite(); instance.setNameBytes(value); return this; } /** *
     * If non-empty specifies a path under which inherited HTTP paths
     * are rooted.
     * 
* * string root = 2; */ @java.lang.Override public java.lang.String getRoot() { return instance.getRoot(); } /** *
     * If non-empty specifies a path under which inherited HTTP paths
     * are rooted.
     * 
* * string root = 2; */ @java.lang.Override public com.google.protobuf.ByteString getRootBytes() { return instance.getRootBytes(); } /** *
     * If non-empty specifies a path under which inherited HTTP paths
     * are rooted.
     * 
* * string root = 2; */ public Builder setRoot( java.lang.String value) { copyOnWrite(); instance.setRoot(value); return this; } /** *
     * If non-empty specifies a path under which inherited HTTP paths
     * are rooted.
     * 
* * string root = 2; */ public Builder clearRoot() { copyOnWrite(); instance.clearRoot(); return this; } /** *
     * If non-empty specifies a path under which inherited HTTP paths
     * are rooted.
     * 
* * string root = 2; */ public Builder setRootBytes( com.google.protobuf.ByteString value) { copyOnWrite(); instance.setRootBytes(value); return this; } // @@protoc_insertion_point(builder_scope:google.protobuf.Mixin) } @java.lang.Override @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) protected final java.lang.Object dynamicMethod( com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1) { switch (method) { case NEW_MUTABLE_INSTANCE: { return new com.google.protobuf.Mixin(); } case NEW_BUILDER: { return new Builder(); } case BUILD_MESSAGE_INFO: { java.lang.Object[] objects = new java.lang.Object[] { "name_", "root_", }; java.lang.String info = "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0208\u0002\u0208" + ""; return newMessageInfo(DEFAULT_INSTANCE, info, objects); } // fall through case GET_DEFAULT_INSTANCE: { return DEFAULT_INSTANCE; } case GET_PARSER: { com.google.protobuf.Parser parser = PARSER; if (parser == null) { synchronized (com.google.protobuf.Mixin.class) { parser = PARSER; if (parser == null) { parser = new DefaultInstanceBasedParser(DEFAULT_INSTANCE); PARSER = parser; } } } return parser; } case GET_MEMOIZED_IS_INITIALIZED: { return (byte) 1; } case SET_MEMOIZED_IS_INITIALIZED: { return null; } } throw new UnsupportedOperationException(); } // @@protoc_insertion_point(class_scope:google.protobuf.Mixin) private static final com.google.protobuf.Mixin DEFAULT_INSTANCE; static { // New instances are implicitly immutable so no need to make // immutable. DEFAULT_INSTANCE = new Mixin(); } static { com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( Mixin.class, DEFAULT_INSTANCE); } public static com.google.protobuf.Mixin getDefaultInstance() { return DEFAULT_INSTANCE; } private static volatile com.google.protobuf.Parser PARSER; public static com.google.protobuf.Parser parser() { return DEFAULT_INSTANCE.getParserForType(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy