• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Bynder / bynder-java-sdk / 22679302217

04 Mar 2026 04:42PM UTC coverage: 39.99% (+0.03%) from 39.959%
22679302217

push

github

web-flow
API-2609: Include the ability to mark asset as public during Upload (#150)

* API-2609 add isPublic to upload query as a param

* API-2609 update unit test

3 of 6 new or added lines in 3 files covered. (50.0%)

1 existing line in 1 file now uncovered.

791 of 1978 relevant lines covered (39.99%)

0.4 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/bynder/sdk/query/upload/SaveMediaQuery.java
1
/*
2
 * Copyright (c) 2017 Bynder B.V. All rights reserved.
3
 *
4
 * Licensed under the MIT License. See LICENSE file in the project root for full license
5
 * information.
6
 */
7
package com.bynder.sdk.query.upload;
8

9
import com.bynder.sdk.query.MetapropertyAttribute;
10
import com.bynder.sdk.query.decoder.ApiField;
11
import com.bynder.sdk.query.decoder.MetapropertyAttributesDecoder;
12

13
import java.util.ArrayList;
14
import java.util.List;
15

16
/**
17
 * Query with the information to save a media asset.
18
 */
19
public class SaveMediaQuery {
20

21
    /**
22
     * Import id of a finalised and processed upload to save.
23
     */
24
    @ApiField
25
    private final String importId;
26

27
    /**
28
     * Brand id to save the media asset to.
29
     */
30
    @ApiField
31
    private String brandId;
32

33
    /**
34
     * Name of the media asset.
35
     */
36
    @ApiField
37
    private String name;
38

39
    /**
40
     * Media id for which to save the new version.
41
     */
42
    @ApiField(name = "id")
43
    private String mediaId;
44

45
    /**
46
     * Flags if the media asset should be sent to the waiting room.
47
     */
48
    @ApiField
49
    private Boolean audit;
50

51
    /**
52
     * Comma-separated list of tags to be set on the asset.
53
     */
54
    @ApiField
55
    private String tags;
56

57

58
    /**
59
     * Flags if media asset should be set to public
60
     */
61
    @ApiField
62
    private Boolean isPublic;
63

64
    /**
65
     * Dictionary with (metaproperty) options to set on the asset upon upload.
66
     */
67
    @ApiField(name = "metaproperty", decoder = MetapropertyAttributesDecoder.class)
68
    private List<MetapropertyAttribute> metaproperties;
69

70
    public SaveMediaQuery(final String importId) {
×
71
        this.importId = importId;
×
72
        this.metaproperties = new ArrayList<>();
×
73
    }
×
74

75
    public SaveMediaQuery setBrandId(final String brandId) {
76
        this.brandId = brandId;
×
77
        return this;
×
78
    }
79

80
    public SaveMediaQuery setName(final String name) {
81
        this.name = name;
×
82
        return this;
×
83
    }
84

85
    public SaveMediaQuery setMediaId(final String mediaId) {
86
        this.mediaId = mediaId;
×
87
        return this;
×
88
    }
89

90
    public SaveMediaQuery setAudit(final Boolean audit) {
91
        this.audit = audit;
×
92
        return this;
×
93
    }
94

95
    public SaveMediaQuery setTags(final String tags) {
96
        this.tags = tags;
×
97
        return this;
×
98
    }
99

100
    public SaveMediaQuery setMetaproperties(List<MetapropertyAttribute> metaproperties) {
101
        this.metaproperties = metaproperties;
×
102
        return this;
×
103
    }
104

105
    public SaveMediaQuery setIsPublic(final boolean isPublic) {
NEW
106
        this.isPublic = isPublic;
×
NEW
107
        return this;
×
108
    }
109

110
    public SaveMediaQuery addMetaproperty(final MetapropertyAttribute metaproperty) {
111
        this.metaproperties.add(metaproperty);
×
112
        return this;
×
113
    }
114

115
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc