Class PushConfig

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, PushConfigOrBuilder, Serializable

    public final class PushConfig
    extends com.google.protobuf.GeneratedMessageV3
    implements PushConfigOrBuilder
     Configuration for a push delivery endpoint.
     
    Protobuf type google.pubsub.v1.PushConfig
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  PushConfig.AuthenticationMethodCase  
      static class  PushConfig.Builder
      Configuration for a push delivery endpoint.
      static class  PushConfig.NoWrapper
      Sets the `data` field as the HTTP body for delivery.
      static interface  PushConfig.NoWrapperOrBuilder  
      static class  PushConfig.OidcToken
      Contains information needed for generating an [OpenID Connect token](https://developers.google.com/identity/protocols/OpenIDConnect).
      static interface  PushConfig.OidcTokenOrBuilder  
      static class  PushConfig.PubsubWrapper
      The payload to the push endpoint is in the form of the JSON representation of a PubsubMessage (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
      static interface  PushConfig.PubsubWrapperOrBuilder  
      static class  PushConfig.WrapperCase  
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getPushEndpoint

        public String getPushEndpoint()
         A URL locating the endpoint to which messages should be pushed.
         For example, a Webhook endpoint might use `https://example.com/push`.
         
        string push_endpoint = 1;
        Specified by:
        getPushEndpoint in interface PushConfigOrBuilder
        Returns:
        The pushEndpoint.
      • getPushEndpointBytes

        public com.google.protobuf.ByteString getPushEndpointBytes()
         A URL locating the endpoint to which messages should be pushed.
         For example, a Webhook endpoint might use `https://example.com/push`.
         
        string push_endpoint = 1;
        Specified by:
        getPushEndpointBytes in interface PushConfigOrBuilder
        Returns:
        The bytes for pushEndpoint.
      • getAttributesCount

        public int getAttributesCount()
        Description copied from interface: PushConfigOrBuilder
         Endpoint configuration attributes that can be used to control different
         aspects of the message delivery.
        
         The only currently supported attribute is `x-goog-version`, which you can
         use to change the format of the pushed message. This attribute
         indicates the version of the data expected by the endpoint. This
         controls the shape of the pushed message (i.e., its fields and metadata).
        
         If not present during the `CreateSubscription` call, it will default to
         the version of the Pub/Sub API used to make such call. If not present in a
         `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
         calls will always return a valid version, even if the subscription was
         created without this attribute.
        
         The only supported values for the `x-goog-version` attribute are:
        
         * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
         * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
        
         For example:
         `attributes { "x-goog-version": "v1" }`
         
        map<string, string> attributes = 2;
        Specified by:
        getAttributesCount in interface PushConfigOrBuilder
      • containsAttributes

        public boolean containsAttributes​(String key)
         Endpoint configuration attributes that can be used to control different
         aspects of the message delivery.
        
         The only currently supported attribute is `x-goog-version`, which you can
         use to change the format of the pushed message. This attribute
         indicates the version of the data expected by the endpoint. This
         controls the shape of the pushed message (i.e., its fields and metadata).
        
         If not present during the `CreateSubscription` call, it will default to
         the version of the Pub/Sub API used to make such call. If not present in a
         `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
         calls will always return a valid version, even if the subscription was
         created without this attribute.
        
         The only supported values for the `x-goog-version` attribute are:
        
         * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
         * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
        
         For example:
         `attributes { "x-goog-version": "v1" }`
         
        map<string, string> attributes = 2;
        Specified by:
        containsAttributes in interface PushConfigOrBuilder
      • getAttributesMap

        public Map<String,​String> getAttributesMap()
         Endpoint configuration attributes that can be used to control different
         aspects of the message delivery.
        
         The only currently supported attribute is `x-goog-version`, which you can
         use to change the format of the pushed message. This attribute
         indicates the version of the data expected by the endpoint. This
         controls the shape of the pushed message (i.e., its fields and metadata).
        
         If not present during the `CreateSubscription` call, it will default to
         the version of the Pub/Sub API used to make such call. If not present in a
         `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
         calls will always return a valid version, even if the subscription was
         created without this attribute.
        
         The only supported values for the `x-goog-version` attribute are:
        
         * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
         * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
        
         For example:
         `attributes { "x-goog-version": "v1" }`
         
        map<string, string> attributes = 2;
        Specified by:
        getAttributesMap in interface PushConfigOrBuilder
      • getAttributesOrDefault

        public String getAttributesOrDefault​(String key,
                                             String defaultValue)
         Endpoint configuration attributes that can be used to control different
         aspects of the message delivery.
        
         The only currently supported attribute is `x-goog-version`, which you can
         use to change the format of the pushed message. This attribute
         indicates the version of the data expected by the endpoint. This
         controls the shape of the pushed message (i.e., its fields and metadata).
        
         If not present during the `CreateSubscription` call, it will default to
         the version of the Pub/Sub API used to make such call. If not present in a
         `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
         calls will always return a valid version, even if the subscription was
         created without this attribute.
        
         The only supported values for the `x-goog-version` attribute are:
        
         * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
         * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
        
         For example:
         `attributes { "x-goog-version": "v1" }`
         
        map<string, string> attributes = 2;
        Specified by:
        getAttributesOrDefault in interface PushConfigOrBuilder
      • getAttributesOrThrow

        public String getAttributesOrThrow​(String key)
         Endpoint configuration attributes that can be used to control different
         aspects of the message delivery.
        
         The only currently supported attribute is `x-goog-version`, which you can
         use to change the format of the pushed message. This attribute
         indicates the version of the data expected by the endpoint. This
         controls the shape of the pushed message (i.e., its fields and metadata).
        
         If not present during the `CreateSubscription` call, it will default to
         the version of the Pub/Sub API used to make such call. If not present in a
         `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
         calls will always return a valid version, even if the subscription was
         created without this attribute.
        
         The only supported values for the `x-goog-version` attribute are:
        
         * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
         * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
        
         For example:
         `attributes { "x-goog-version": "v1" }`
         
        map<string, string> attributes = 2;
        Specified by:
        getAttributesOrThrow in interface PushConfigOrBuilder
      • hasOidcToken

        public boolean hasOidcToken()
         If specified, Pub/Sub will generate and attach an OIDC JWT token as an
         `Authorization` header in the HTTP request for every pushed message.
         
        .google.pubsub.v1.PushConfig.OidcToken oidc_token = 3;
        Specified by:
        hasOidcToken in interface PushConfigOrBuilder
        Returns:
        Whether the oidcToken field is set.
      • getOidcToken

        public PushConfig.OidcToken getOidcToken()
         If specified, Pub/Sub will generate and attach an OIDC JWT token as an
         `Authorization` header in the HTTP request for every pushed message.
         
        .google.pubsub.v1.PushConfig.OidcToken oidc_token = 3;
        Specified by:
        getOidcToken in interface PushConfigOrBuilder
        Returns:
        The oidcToken.
      • getOidcTokenOrBuilder

        public PushConfig.OidcTokenOrBuilder getOidcTokenOrBuilder()
         If specified, Pub/Sub will generate and attach an OIDC JWT token as an
         `Authorization` header in the HTTP request for every pushed message.
         
        .google.pubsub.v1.PushConfig.OidcToken oidc_token = 3;
        Specified by:
        getOidcTokenOrBuilder in interface PushConfigOrBuilder
      • hasPubsubWrapper

        public boolean hasPubsubWrapper()
         When set, the payload to the push endpoint is in the form of the JSON
         representation of a PubsubMessage
         (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
         
        .google.pubsub.v1.PushConfig.PubsubWrapper pubsub_wrapper = 4;
        Specified by:
        hasPubsubWrapper in interface PushConfigOrBuilder
        Returns:
        Whether the pubsubWrapper field is set.
      • getPubsubWrapper

        public PushConfig.PubsubWrapper getPubsubWrapper()
         When set, the payload to the push endpoint is in the form of the JSON
         representation of a PubsubMessage
         (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
         
        .google.pubsub.v1.PushConfig.PubsubWrapper pubsub_wrapper = 4;
        Specified by:
        getPubsubWrapper in interface PushConfigOrBuilder
        Returns:
        The pubsubWrapper.
      • getPubsubWrapperOrBuilder

        public PushConfig.PubsubWrapperOrBuilder getPubsubWrapperOrBuilder()
         When set, the payload to the push endpoint is in the form of the JSON
         representation of a PubsubMessage
         (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
         
        .google.pubsub.v1.PushConfig.PubsubWrapper pubsub_wrapper = 4;
        Specified by:
        getPubsubWrapperOrBuilder in interface PushConfigOrBuilder
      • hasNoWrapper

        public boolean hasNoWrapper()
         When set, the payload to the push endpoint is not wrapped.
         
        .google.pubsub.v1.PushConfig.NoWrapper no_wrapper = 5;
        Specified by:
        hasNoWrapper in interface PushConfigOrBuilder
        Returns:
        Whether the noWrapper field is set.
      • getNoWrapper

        public PushConfig.NoWrapper getNoWrapper()
         When set, the payload to the push endpoint is not wrapped.
         
        .google.pubsub.v1.PushConfig.NoWrapper no_wrapper = 5;
        Specified by:
        getNoWrapper in interface PushConfigOrBuilder
        Returns:
        The noWrapper.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static PushConfig parseFrom​(ByteBuffer data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static PushConfig parseFrom​(ByteBuffer data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static PushConfig parseFrom​(com.google.protobuf.ByteString data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static PushConfig parseFrom​(com.google.protobuf.ByteString data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static PushConfig parseFrom​(byte[] data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static PushConfig parseFrom​(byte[] data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static PushConfig parseFrom​(com.google.protobuf.CodedInputStream input,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws IOException
        Throws:
        IOException
      • newBuilderForType

        public PushConfig.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public PushConfig.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected PushConfig.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static PushConfig getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<PushConfig> parser()
      • getParserForType

        public com.google.protobuf.Parser<PushConfig> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public PushConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder