// NewAnnotateImageSourceRequest returns a pointer to a new vision's AnnotateImagesRequest.
970828
func NewAnnotateImageSourceRequest(source string, features ...*vision.Feature) (*vision.AnnotateImageRequest, error) {
	req := &vision.AnnotateImageRequest{
		Image:    NewAnnotateImageSource(source),
		Features: features,
	}
	return req, nil
}
666286
func newDataSourceFunc(baseURL string) func() simplestreams.DataSource {
	return func() simplestreams.DataSource {
		return simplestreams.NewURLSignedDataSource(
			"ubuntu cloud images",
			baseURL,
			imagemetadata.SimplestreamsImagesPublicKey,
			utils.VerifySSLHostnames,
			simplestreams.DEFAULT_CLOUD_DATA,
			true)
	}
}
336623
func newResourceQuotas(c *Client, namespace string) *resourceQuotas {
	return &resourceQuotas{
		r:  c,
		ns: namespace,
	}
}
801178
func NewResourceService(context servicecontext.ServiceContext) service.ResourceService {
	return &resourceServiceImpl{base.NewBaseService(context)}
}
1318974
func dataSourceImagesImageV2Attributes(d *schema.ResourceData, image *images.Image) error {
	log.Printf("[DEBUG] openstack_images_image details: %#v", image)

	d.SetId(image.ID)
	d.Set("name", image.Name)
	d.Set("tags", image.Tags)
	d.Set("container_format", image.ContainerFormat)
	d.Set("disk_format", image.DiskFormat)
	d.Set("min_disk_gb", image.MinDiskGigabytes)
	d.Set("min_ram_mb", image.MinRAMMegabytes)
	d.Set("owner", image.Owner)
	d.Set("protected", image.Protected)
	d.Set("visibility", image.Visibility)
	d.Set("checksum", image.Checksum)
	d.Set("size_bytes", image.SizeBytes)
	d.Set("metadata", image.Metadata)
	d.Set("created_at", image.CreatedAt.Format(time.RFC3339))
	d.Set("updated_at", image.UpdatedAt.Format(time.RFC3339))
	d.Set("file", image.File)
	d.Set("schema", image.Schema)

	return nil
}
455000
func newAnnotations(in map[string]interface{}) (out map[AnnotationKey]interface{}) {
	if len(in) == 0 {
		return nil
	}
	out = make(map[AnnotationKey]interface{})
	for k, v := range in {
		out[AnnotationKeyString(k)] = v
	}
	return
}
898602
func (m *MockLambdaAPI) TagResourceRequest(arg0 *lambda.TagResourceInput) (*request.Request, *lambda.TagResourceOutput) {
	ret := m.ctrl.Call(m, "TagResourceRequest", arg0)
	ret0, _ := ret[0].(*request.Request)
	ret1, _ := ret[1].(*lambda.TagResourceOutput)
	return ret0, ret1
}
1355999
func (m *MockLambdaAPI) CreateEventSourceMappingRequest(arg0 *lambda.CreateEventSourceMappingInput) (*request.Request, *lambda.EventSourceMappingConfiguration) {
	ret := m.ctrl.Call(m, "CreateEventSourceMappingRequest", arg0)
	ret0, _ := ret[0].(*request.Request)
	ret1, _ := ret[1].(*lambda.EventSourceMappingConfiguration)
	return ret0, ret1
}
81282
func (c *CachedImagesCommandBase) NewImagesManagerClient() (*imagemanager.Client, error) {
	root, err := c.NewAPIRoot()
	if err != nil {
		return nil, err
	}
	return imagemanager.NewClient(root), nil
}
226368
func newResourceQuotas(c *CoreV1Client, namespace string) *resourceQuotas {
	return &resourceQuotas{
		client: c.RESTClient(),
		ns:     namespace,
	}
}
686023
func (c *cloudImageMetadataCommandBase) NewImageMetadataAPI() (*imagemetadatamanager.Client, error) {
	root, err := c.NewAPIRoot()
	if err != nil {
		return nil, err
	}
	return imagemetadatamanager.NewClient(root), nil
}
1075845
func (s *DestinationBackup) SetSourceRegion(v string) *DestinationBackup {
	s.SourceRegion = &v
	return s
}
369471
func annotateResolvingRequest(g *libkb.GlobalContext, req *chatConversationResolvingRequest) (err error) {
	userOrTeamResult, err := CheckUserOrTeamName(context.TODO(), g, req.TlfName)
	if err != nil {
		return err
	}
	switch userOrTeamResult {
	case keybase1.UserOrTeamResult_USER:
		if g.Env.GetChatMemberType() == "impteam" {
			req.MembersType = chat1.ConversationMembersType_IMPTEAMNATIVE
		} else {
			req.MembersType = chat1.ConversationMembersType_KBFS
		}
	case keybase1.UserOrTeamResult_TEAM:
		req.MembersType = chat1.ConversationMembersType_TEAM
	}
	if req.TopicType == chat1.TopicType_CHAT && len(req.TopicName) != 0 &&
		req.MembersType != chat1.ConversationMembersType_TEAM {
		return errors.New("multiple topics only supported for teams and dev channels")
	}

	// Set the default topic name to #general if none is specified
	if req.MembersType == chat1.ConversationMembersType_TEAM && len(req.TopicName) == 0 {
		req.TopicName = globals.DefaultTeamTopic
	}

	return nil
}
132813
func (srv *Server) NewRequest(method, path string) *Request {
	req := NewRequest(srv.assertion, srv.client, method, path)
	req.prefix = srv.server.URL

	return req
}
438895
func NewURIImagemapAction(linkURL string, area ImagemapArea) *URIImagemapAction {
	return &URIImagemapAction{
		LinkURL: linkURL,
		Area:    area,
	}
}
506049
func NewImageCarouselColumn(imageURL string, action TemplateAction) *ImageCarouselColumn {
	return &ImageCarouselColumn{
		ImageURL: imageURL,
		Action:   action,
	}
}
723958
func NewRequest(method, path string) *Request {
	return &Request{
		method: method,
		url: &url.URL{
			Path: path,
		},
		header: make(http.Header),
		Params: make(url.Values),
	}
}