// PublishZone Publish a specific zone and the changes for the current session
973136
func (c *ConvenientClient) PublishZone(zone string) error {
	url := fmt.Sprintf("Zone/%s", zone)
	data := &PublishZoneBlock{
		Publish: true,
	}

	if err := c.Do("PUT", url, data, nil); err != nil {
		return fmt.Errorf("Failed to publish zone: %s", err)
	}

	return nil
}
799462
func (s *ZoneService) ReleaseDedicatedZone(p *ReleaseDedicatedZoneParams) (*ReleaseDedicatedZoneResponse, error) {
	resp, err := s.cs.newRequest("releaseDedicatedZone", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ReleaseDedicatedZoneResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	// If we have a async client, we need to wait for the async result
	if s.cs.async {
		b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout)
		if err != nil {
			if err == AsyncTimeoutErr {
				return &r, err
			}
			return nil, err
		}

		if err := json.Unmarshal(b, &r); err != nil {
			return nil, err
		}
	}

	return &r, nil
}
616615
func (v *DNSView) AddZone(info DNSZoneInfo) (*DNSZoneInfo, error) {
	createRecords := []*DNSRecord{
		{
			RrsType: "NS",
			Name:    info.Name,
			Rrdatas: []string{"gossip"},
		},
	}

	err := v.ApplyChangeset(info, nil, createRecords)
	if err != nil {
		return nil, err
	}

	return &DNSZoneInfo{
		Name: info.Name,
	}, nil
}
228363
func (c *Client) Publish(pub *Publisher) {
	c.l.Lock()
	defer c.l.Unlock()
	c.publishers[pub] = struct{}{}
	if ch, err := c.channel(); err == nil {
		go pub.serve(c, ch)
	}
}
534536
func (p *Publisher) Publish(pub amqp.Publishing) error {
	return p.PublishWithRoutingKey(pub, p.key)
}
876549
func (s *UpdateProfileInput) SetTimezone(v string) *UpdateProfileInput {
	s.Timezone = &v
	return s
}
1220176
func (c *ConvenientClient) DeleteZone(zone string) error {
	url := fmt.Sprintf("Zone/%s/", zone)

	if err := c.Do("DELETE", url, nil, nil); err != nil {
		return fmt.Errorf("Failed to delete zone: %s", err)
	}

	return nil
}
278538
func (m *Machine) AvailabilityZone() (string, error) {
	instData, err := getInstanceData(m.st, m.Id())
	if errors.IsNotFound(err) {
		return "", errors.Trace(errors.NotProvisionedf("machine %v", m.Id()))
	}
	if err != nil {
		return "", errors.Trace(err)
	}
	var zone string
	if instData.AvailZone != nil {
		zone = *instData.AvailZone
	}
	return zone, nil
}
190476
func (s *ZoneService) CreateZone(p *CreateZoneParams) (*CreateZoneResponse, error) {
	resp, err := s.cs.newRequest("createZone", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r CreateZoneResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
70464
func (obj *Global) PublishApp(ctx context.Context, appId string, name string, streamId string) error {
	err := obj.rpc(ctx, "PublishApp", nil, appId, name, streamId)
	return err 
}
709691
func (s *DescribeMaintenanceStartTimeOutput) SetTimezone(v string) *DescribeMaintenanceStartTimeOutput {
	s.Timezone = &v
	return s
}
652462
func (srv *Instance) PublishEvent(e lifecycle.Event) error {
	return lifecycle.PublishEvent(e, srv.connector)
}
381
func (s *GetMaintenanceWindowOutput) SetScheduleTimezone(v string) *GetMaintenanceWindowOutput {
	s.ScheduleTimezone = &v
	return s
}
376739
func (publishEvent *PublishEvent) Publish(db *gorm.DB) error {
	if event, ok := events[publishEvent.Name]; ok {
		err := event.Publish(db, publishEvent)
		if err == nil {
			var updateAttrs = map[string]interface{}{"PublishStatus": PUBLISHED}
			if user, hasUser := getCurrentUser(db); hasUser {
				updateAttrs["PublishedBy"] = user
			}
			err = db.Model(publishEvent).Update(updateAttrs).Error
		}
		return err
	}
	return errors.New("event not found")
}
688516
func (az *Cloud) makeZone(zoneID int) string {
	return fmt.Sprintf("%s-%d", strings.ToLower(az.Location), zoneID)
}
57276
func (s *Schedule) SetTimezone(v string) *Schedule {
	s.Timezone = &v
	return s
}
1051395
func (c *Client) DeleteZone(p *DeleteZoneParameter) (*Result, error) {
	obj, err := c.Request("deleteZone", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Result), err
}