Class Offer

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

    public final class Offer
    extends com.google.protobuf.GeneratedMessageV3
    implements OfferOrBuilder
     Represents an offer made to resellers for purchase.
     An offer is associated with a [Sku][google.cloud.channel.v1.Sku], has a plan
     for payment, a price, and defines the constraints for buying.
     
    Protobuf type google.cloud.channel.v1.Offer
    See Also:
    Serialized Form
    • 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()
      • internalGetFieldAccessorTable

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

        public String getName()
         Resource Name of the Offer.
         Format: accounts/{account_id}/offers/{offer_id}
         
        string name = 1;
        Specified by:
        getName in interface OfferOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Resource Name of the Offer.
         Format: accounts/{account_id}/offers/{offer_id}
         
        string name = 1;
        Specified by:
        getNameBytes in interface OfferOrBuilder
        Returns:
        The bytes for name.
      • hasMarketingInfo

        public boolean hasMarketingInfo()
         Marketing information for the Offer.
         
        .google.cloud.channel.v1.MarketingInfo marketing_info = 2;
        Specified by:
        hasMarketingInfo in interface OfferOrBuilder
        Returns:
        Whether the marketingInfo field is set.
      • getMarketingInfo

        public MarketingInfo getMarketingInfo()
         Marketing information for the Offer.
         
        .google.cloud.channel.v1.MarketingInfo marketing_info = 2;
        Specified by:
        getMarketingInfo in interface OfferOrBuilder
        Returns:
        The marketingInfo.
      • hasSku

        public boolean hasSku()
         SKU the offer is associated with.
         
        .google.cloud.channel.v1.Sku sku = 3;
        Specified by:
        hasSku in interface OfferOrBuilder
        Returns:
        Whether the sku field is set.
      • getSku

        public Sku getSku()
         SKU the offer is associated with.
         
        .google.cloud.channel.v1.Sku sku = 3;
        Specified by:
        getSku in interface OfferOrBuilder
        Returns:
        The sku.
      • hasPlan

        public boolean hasPlan()
         Describes the payment plan for the Offer.
         
        .google.cloud.channel.v1.Plan plan = 4;
        Specified by:
        hasPlan in interface OfferOrBuilder
        Returns:
        Whether the plan field is set.
      • getPlan

        public Plan getPlan()
         Describes the payment plan for the Offer.
         
        .google.cloud.channel.v1.Plan plan = 4;
        Specified by:
        getPlan in interface OfferOrBuilder
        Returns:
        The plan.
      • hasConstraints

        public boolean hasConstraints()
         Constraints on transacting the Offer.
         
        .google.cloud.channel.v1.Constraints constraints = 5;
        Specified by:
        hasConstraints in interface OfferOrBuilder
        Returns:
        Whether the constraints field is set.
      • getConstraints

        public Constraints getConstraints()
         Constraints on transacting the Offer.
         
        .google.cloud.channel.v1.Constraints constraints = 5;
        Specified by:
        getConstraints in interface OfferOrBuilder
        Returns:
        The constraints.
      • getPriceByResourcesCount

        public int getPriceByResourcesCount()
         Price for each monetizable resource type.
         
        repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6;
        Specified by:
        getPriceByResourcesCount in interface OfferOrBuilder
      • getPriceByResources

        public PriceByResource getPriceByResources​(int index)
         Price for each monetizable resource type.
         
        repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6;
        Specified by:
        getPriceByResources in interface OfferOrBuilder
      • hasStartTime

        public boolean hasStartTime()
         Start of the Offer validity time.
         
        .google.protobuf.Timestamp start_time = 7;
        Specified by:
        hasStartTime in interface OfferOrBuilder
        Returns:
        Whether the startTime field is set.
      • getStartTime

        public com.google.protobuf.Timestamp getStartTime()
         Start of the Offer validity time.
         
        .google.protobuf.Timestamp start_time = 7;
        Specified by:
        getStartTime in interface OfferOrBuilder
        Returns:
        The startTime.
      • getStartTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder()
         Start of the Offer validity time.
         
        .google.protobuf.Timestamp start_time = 7;
        Specified by:
        getStartTimeOrBuilder in interface OfferOrBuilder
      • hasEndTime

        public boolean hasEndTime()
         Output only. End of the Offer validity time.
         
        .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasEndTime in interface OfferOrBuilder
        Returns:
        Whether the endTime field is set.
      • getEndTime

        public com.google.protobuf.Timestamp getEndTime()
         Output only. End of the Offer validity time.
         
        .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getEndTime in interface OfferOrBuilder
        Returns:
        The endTime.
      • getEndTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder()
         Output only. End of the Offer validity time.
         
        .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getEndTimeOrBuilder in interface OfferOrBuilder
      • getParameterDefinitionsCount

        public int getParameterDefinitionsCount()
         Parameters required to use current Offer to purchase.
         
        repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9;
        Specified by:
        getParameterDefinitionsCount in interface OfferOrBuilder
      • getParameterDefinitions

        public ParameterDefinition getParameterDefinitions​(int index)
         Parameters required to use current Offer to purchase.
         
        repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9;
        Specified by:
        getParameterDefinitions in interface OfferOrBuilder
      • getDealCode

        public String getDealCode()
         The deal code of the offer to get a special promotion or discount.
         
        string deal_code = 12;
        Specified by:
        getDealCode in interface OfferOrBuilder
        Returns:
        The dealCode.
      • getDealCodeBytes

        public com.google.protobuf.ByteString getDealCodeBytes()
         The deal code of the offer to get a special promotion or discount.
         
        string deal_code = 12;
        Specified by:
        getDealCodeBytes in interface OfferOrBuilder
        Returns:
        The bytes for dealCode.
      • 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 Offer parseFrom​(ByteBuffer data)
                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

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

        public static Offer getDefaultInstance()
      • parser

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

        public com.google.protobuf.Parser<Offer> 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 Offer getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder