// GetSubscriptionsURL returns the SubscriptionsURL field if it's non-nil, zero value otherwise.
557695
func (c *Contributor) GetSubscriptionsURL() string {
	if c == nil || c.SubscriptionsURL == nil {
		return ""
	}
	return *c.SubscriptionsURL
}
1201848
func (f *FakeDocker) GetScriptsURL(image string) (string, error) {
	f.DefaultURLImage = image
	return f.DefaultURLResult, f.DefaultURLError
}
146529
func parseSubscriptionName(rawArgs json.RawMessage) (string, error) {
	dec := json.NewDecoder(bytes.NewReader(rawArgs))
	if tok, _ := dec.Token(); tok != json.Delim('[') {
		return "", errors.New("non-array args")
	}
	v, _ := dec.Token()
	method, ok := v.(string)
	if !ok {
		return "", errors.New("expected subscription name as first argument")
	}
	return method, nil
}
599007
func (s *Subscription) GetURL() string {
	if s == nil || s.URL == nil {
		return ""
	}
	return *s.URL
}
836761
func findSubscriptionByNonID(d *schema.ResourceData, snsconn *sns.SNS) (*sns.Subscription, error) {
	protocol := d.Get("protocol").(string)
	endpoint := d.Get("endpoint").(string)
	topic_arn := d.Get("topic_arn").(string)
	obfuscatedEndpoint := obfuscateEndpoint(endpoint)

	req := &sns.ListSubscriptionsByTopicInput{
		TopicArn: aws.String(topic_arn),
	}

	for {
		res, err := snsconn.ListSubscriptionsByTopic(req)

		if err != nil {
			return nil, fmt.Errorf("Error fetching subscriptions for topic %s : %s", topic_arn, err)
		}

		for _, subscription := range res.Subscriptions {
			log.Printf("[DEBUG] check subscription with Subscription EndPoint %s (local: %s), Protocol %s, topicARN %s and SubscriptionARN %s", *subscription.Endpoint, obfuscatedEndpoint, *subscription.Protocol, *subscription.TopicArn, *subscription.SubscriptionArn)
			if *subscription.Endpoint == obfuscatedEndpoint && *subscription.Protocol == protocol && *subscription.TopicArn == topic_arn && !subscriptionHasPendingConfirmation(subscription.SubscriptionArn) {
				return subscription, nil
			}
		}

		// if there are more than 100 subscriptions then go to the next 100 otherwise return an error
		if res.NextToken != nil {
			req.NextToken = res.NextToken
		} else {
			return nil, fmt.Errorf("Error finding subscription for topic %s with endpoint %s and protocol %s", topic_arn, endpoint, protocol)
		}
	}
}
575956
func SubscriptionsWrite(ctx formatter.Context, subs []licenseutils.LicenseDisplay) error {
	render := func(format func(subContext formatter.SubContext) error) error {
		for _, sub := range subs {
			licenseCtx := &licenseContext{trunc: ctx.Trunc, l: sub}
			if err := format(licenseCtx); err != nil {
				return err
			}
		}
		return nil
	}
	licenseCtx := licenseContext{}
	licenseCtx.Header = map[string]string{
		"Num":               numHeader,
		"Owner":             ownerHeader,
		"Name":              licenseNameHeader,
		"ID":                idHeader,
		"DockerID":          dockerIDHeader,
		"ProductID":         productIDHeader,
		"ProductRatePlan":   productRatePlanHeader,
		"ProductRatePlanID": productRatePlanIDHeader,
		"Start":             startHeader,
		"Expires":           expiresHeader,
		"State":             stateHeader,
		"Eusa":              eusaHeader,
		"ComponentsString":  pricingComponentsHeader,
	}
	return ctx.Write(&licenseCtx, render)
}
903560
func (c *client) getSubsCopy() []*subState {
	subs := make([]*subState, len(c.subs))
	copy(subs, c.subs)
	return subs
}
889624
func (r *Repository) GetIssuesURL() string {
	if r == nil || r.IssuesURL == nil {
		return ""
	}
	return *r.IssuesURL
}
1297932
func (r *marathonClient) SubscriptionURL() string {
	if r.config.CallbackURL != "" {
		return fmt.Sprintf("%s%s", r.config.CallbackURL, defaultEventsURL)
	}

	return fmt.Sprintf("http://%s:%d%s", r.ipAddress, r.config.EventsPort, defaultEventsURL)
}
1102055
func (r *Repository) GetSubscribersURL() string {
	if r == nil || r.SubscribersURL == nil {
		return ""
	}
	return *r.SubscribersURL
}
1231832
func (c *Contributor) GetGistsURL() string {
	if c == nil || c.GistsURL == nil {
		return ""
	}
	return *c.GistsURL
}
578962
func (r Email_Subscription_Group) GetSubscriptions() (resp []datatypes.Email_Subscription, err error) {
	err = r.Session.DoRequest("SoftLayer_Email_Subscription_Group", "getSubscriptions", nil, &r.Options, &resp)
	return
}
247186
func (s *Server) updateRouteSubscriptionMap(acc *Account, sub *subscription, delta int32) {
	if acc == nil || sub == nil {
		return
	}
	acc.mu.RLock()
	rm := acc.rm
	acc.mu.RUnlock()

	// This is non-nil when we know we are in cluster mode.
	if rm == nil {
		return
	}

	// We only store state on local subs for transmission across all other routes.
	if sub.client == nil || (sub.client.kind != CLIENT && sub.client.kind != SYSTEM && sub.client.kind != LEAF) {
		return
	}

	// Create the fast key which will use the subject or 'subject<spc>queue' for queue subscribers.
	var (
		_rkey  [1024]byte
		key    []byte
		update bool
	)
	if sub.queue != nil {
		// Just make the key subject spc group, e.g. 'foo bar'
		key = _rkey[:0]
		key = append(key, sub.subject...)
		key = append(key, byte(' '))
		key = append(key, sub.queue...)
		// We always update for a queue subscriber since we need to send our relative weight.
		update = true
	} else {
		key = sub.subject
	}

	// Copy to hold outside acc lock.
	var n int32
	var ok bool

	acc.mu.Lock()
	if n, ok = rm[string(key)]; ok {
		n += delta
		if n <= 0 {
			delete(rm, string(key))
			update = true // Update for deleting (N->0)
		} else {
			rm[string(key)] = n
		}
	} else if delta > 0 {
		n = delta
		rm[string(key)] = delta
		update = true // Adding a new entry for normal sub means update (0->1)
	}
	acc.mu.Unlock()

	if !update {
		return
	}
	// We need to send out this update.

	// If we are sending a queue sub, copy and place in the queue weight.
	if sub.queue != nil {
		sub.client.mu.Lock()
		nsub := *sub
		sub.client.mu.Unlock()
		nsub.qw = n
		sub = &nsub
	}

	// Note that queue unsubs where entry.n > 0 are still
	// subscribes with a smaller weight.
	if n > 0 {
		s.broadcastSubscribe(sub)
	} else {
		s.broadcastUnSubscribe(sub)
	}
}
261157
func (n *NotificationSubject) GetURL() string {
	if n == nil || n.URL == nil {
		return ""
	}
	return *n.URL
}
39572
func determineSubnetURL(service *compute.Service, networkProjectID, networkName, region string) (string, error) {
	subnets, err := listSubnetworksOfNetwork(service, networkProjectID, networkName, region)
	if err != nil {
		return "", err
	}

	autoSubnets, err := subnetsInCIDR(subnets, autoSubnetIPRange)
	if err != nil {
		return "", err
	}

	if len(autoSubnets) == 0 {
		return "", fmt.Errorf("no subnet exists in auto CIDR")
	}

	if len(autoSubnets) > 1 {
		return "", fmt.Errorf("multiple subnetworks in the same region exist in auto CIDR")
	}

	return autoSubnets[0].SelfLink, nil
}
764339
func (s *ActivityService) GetThreadSubscription(ctx context.Context, id string) (*Subscription, *Response, error) {
	u := fmt.Sprintf("notifications/threads/%v/subscription", id)

	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	sub := new(Subscription)
	resp, err := s.client.Do(ctx, req, sub)
	if err != nil {
		return nil, resp, err
	}

	return sub, resp, nil
}
156436
func (u *UserLDAPMapping) GetReposURL() string {
	if u == nil || u.ReposURL == nil {
		return ""
	}
	return *u.ReposURL
}