// SetPublish sets the Publish field's value.
434138
func (s *CreateFunctionInput) SetPublish(v bool) *CreateFunctionInput {
	s.Publish = &v
	return s
}
370773
func SetPublishExchange(publishExchange string) RequestFunc {
	return func(ctx context.Context, pub *amqp.Publishing, _ *amqp.Delivery) context.Context {
		return context.WithValue(ctx, ContextKeyExchange, publishExchange)
	}
}
1139570
func (p *IpnsPublisher) Publish(ctx context.Context, k ci.PrivKey, value path.Path) error {
	log.Debugf("Publish %s", value)
	return p.PublishWithEOL(ctx, k, value, time.Now().Add(DefaultRecordEOL))
}
533559
func (s *KeyPair) SetPublicKey(v string) *KeyPair {
	s.PublicKey = &v
	return s
}
36206
func (p *UNSUBSCRIBE) setPayload() {
	// Append each Topic Filter to the payload.
	for _, tf := range p.TopicFilters {
		// Append the Topic Filter to the payload.
		p.payload = appendLenStr(p.payload, tf)
	}
}
417363
func (s *UpdateDevEndpointInput) SetPublicKey(v string) *UpdateDevEndpointInput {
	s.PublicKey = &v
	return s
}
1197329
func (s *UpdateElasticsearchDomainConfigInput) SetLogPublishingOptions(v map[string]*LogPublishingOption) *UpdateElasticsearchDomainConfigInput {
	s.LogPublishingOptions = v
	return s
}
8334
func (s *UpdateJobInput) SetJobUpdate(v *JobUpdate) *UpdateJobInput {
	s.JobUpdate = v
	return s
}
633554
func (s *GetPublicKeyOutput) SetPublicKey(v *PublicKey) *GetPublicKeyOutput {
	s.PublicKey = v
	return s
}
1267999
func (s *ClusterNode) SetPublicIPAddress(v string) *ClusterNode {
	s.PublicIPAddress = &v
	return s
}
622893
func NewPublisher(topic string, c client.Client) Publisher {
	if c == nil {
		c = client.NewClient()
	}
	return &publisher{c, topic}
}
255571
func (s *UserProfile) SetSshPublicKey(v string) *UserProfile {
	s.SshPublicKey = &v
	return s
}
1178207
func (s *GetSSHPublicKeyOutput) SetSSHPublicKey(v *SSHPublicKey) *GetSSHPublicKeyOutput {
	s.SSHPublicKey = v
	return s
}
689572
func (c *Client) processPublish(publish *packet.Publish) error {
	// call callback for unacknowledged and directly acknowledged messages
	if publish.Message.QOS <= 1 {
		if c.Callback != nil {
			err := c.Callback(&publish.Message, nil)
			if err != nil {
				return c.die(err, true, true)
			}
		}
	}

	// handle qos 1 flow
	if publish.Message.QOS == 1 {
		// prepare puback packet
		puback := packet.NewPuback()
		puback.ID = publish.ID

		// acknowledge qos 1 publish
		err := c.send(puback, true)
		if err != nil {
			return c.die(err, false, false)
		}
	}

	// handle qos 2 flow
	if publish.Message.QOS == 2 {
		// store packet
		err := c.Session.SavePacket(session.Incoming, publish)
		if err != nil {
			return c.die(err, true, false)
		}

		// prepare pubrec packet
		pubrec := packet.NewPubrec()
		pubrec.ID = publish.ID

		// acknowledge qos 2 publish
		err = c.send(pubrec, true)
		if err != nil {
			return c.die(err, false, false)
		}
	}

	return nil
}
763587
func (s *UploadSSHPublicKeyInput) SetSSHPublicKeyBody(v string) *UploadSSHPublicKeyInput {
	s.SSHPublicKeyBody = &v
	return s
}
465820
func (s *Instance) SetPublicDns(v string) *Instance {
	s.PublicDns = &v
	return s
}
1323231
func (s *CreateUserProfileOutput) SetSshPublicKey(v string) *CreateUserProfileOutput {
	s.SshPublicKey = &v
	return s
}