Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion core/api/core.api
Original file line number Diff line number Diff line change
Expand Up @@ -36350,15 +36350,27 @@ public class com/dropbox/core/v2/teamlog/SharedLinkShareType {

public class com/dropbox/core/v2/teamlog/SharedLinkViewDetails {
protected final field sharedLinkOwner Lcom/dropbox/core/v2/teamlog/UserLogInfo;
protected final field subdomain Ljava/lang/String;
public fun <init> ()V
public fun <init> (Lcom/dropbox/core/v2/teamlog/UserLogInfo;)V
public fun <init> (Lcom/dropbox/core/v2/teamlog/UserLogInfo;Ljava/lang/String;)V
public fun equals (Ljava/lang/Object;)Z
public fun getSharedLinkOwner ()Lcom/dropbox/core/v2/teamlog/UserLogInfo;
public fun getSubdomain ()Ljava/lang/String;
public fun hashCode ()I
public static fun newBuilder ()Lcom/dropbox/core/v2/teamlog/SharedLinkViewDetails$Builder;
public fun toString ()Ljava/lang/String;
public fun toStringMultiline ()Ljava/lang/String;
}

public class com/dropbox/core/v2/teamlog/SharedLinkViewDetails$Builder {
protected field sharedLinkOwner Lcom/dropbox/core/v2/teamlog/UserLogInfo;
protected field subdomain Ljava/lang/String;
protected fun <init> ()V
public fun build ()Lcom/dropbox/core/v2/teamlog/SharedLinkViewDetails;
public fun withSharedLinkOwner (Lcom/dropbox/core/v2/teamlog/UserLogInfo;)Lcom/dropbox/core/v2/teamlog/SharedLinkViewDetails$Builder;
public fun withSubdomain (Ljava/lang/String;)Lcom/dropbox/core/v2/teamlog/SharedLinkViewDetails$Builder;
}

public class com/dropbox/core/v2/teamlog/SharedLinkViewType {
protected final field description Ljava/lang/String;
public fun <init> (Ljava/lang/String;)V
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,22 @@ public class SharedLinkViewDetails {

@Nullable
protected final UserLogInfo sharedLinkOwner;
@Nullable
protected final String subdomain;

/**
* Opened shared link.
*
* <p> Use {@link newBuilder} to create instances of this class without
* specifying values for all optional fields. </p>
*
* @param sharedLinkOwner Shared link owner details. Might be missing due
* to historical data gap.
* @param subdomain Team subdomain used to access the shared link.
*/
public SharedLinkViewDetails(@Nullable UserLogInfo sharedLinkOwner) {
public SharedLinkViewDetails(@Nullable UserLogInfo sharedLinkOwner, @Nullable String subdomain) {
this.sharedLinkOwner = sharedLinkOwner;
this.subdomain = subdomain;
}

/**
Expand All @@ -44,7 +51,7 @@ public SharedLinkViewDetails(@Nullable UserLogInfo sharedLinkOwner) {
* <p> The default values for unset fields will be used. </p>
*/
public SharedLinkViewDetails() {
this(null);
this(null, null);
}

/**
Expand All @@ -57,10 +64,79 @@ public UserLogInfo getSharedLinkOwner() {
return sharedLinkOwner;
}

/**
* Team subdomain used to access the shared link.
*
* @return value for this field, or {@code null} if not present.
*/
@Nullable
public String getSubdomain() {
return subdomain;
}

/**
* Returns a new builder for creating an instance of this class.
*
* @return builder for this class.
*/
public static Builder newBuilder() {
return new Builder();
}

/**
* Builder for {@link SharedLinkViewDetails}.
*/
public static class Builder {

protected UserLogInfo sharedLinkOwner;
protected String subdomain;

protected Builder() {
this.sharedLinkOwner = null;
this.subdomain = null;
}

/**
* Set value for optional field.
*
* @param sharedLinkOwner Shared link owner details. Might be missing
* due to historical data gap.
*
* @return this builder
*/
public Builder withSharedLinkOwner(UserLogInfo sharedLinkOwner) {
this.sharedLinkOwner = sharedLinkOwner;
return this;
}

/**
* Set value for optional field.
*
* @param subdomain Team subdomain used to access the shared link.
*
* @return this builder
*/
public Builder withSubdomain(String subdomain) {
this.subdomain = subdomain;
return this;
}

/**
* Builds an instance of {@link SharedLinkViewDetails} configured with
* this builder's values
*
* @return new instance of {@link SharedLinkViewDetails}
*/
public SharedLinkViewDetails build() {
return new SharedLinkViewDetails(sharedLinkOwner, subdomain);
}
}

@Override
public int hashCode() {
int hash = Arrays.hashCode(new Object [] {
this.sharedLinkOwner
this.sharedLinkOwner,
this.subdomain
});
return hash;
}
Expand All @@ -76,7 +152,9 @@ public boolean equals(Object obj) {
// be careful with inheritance
else if (obj.getClass().equals(this.getClass())) {
SharedLinkViewDetails other = (SharedLinkViewDetails) obj;
return (this.sharedLinkOwner == other.sharedLinkOwner) || (this.sharedLinkOwner != null && this.sharedLinkOwner.equals(other.sharedLinkOwner));
return ((this.sharedLinkOwner == other.sharedLinkOwner) || (this.sharedLinkOwner != null && this.sharedLinkOwner.equals(other.sharedLinkOwner)))
&& ((this.subdomain == other.subdomain) || (this.subdomain != null && this.subdomain.equals(other.subdomain)))
;
}
else {
return false;
Expand Down Expand Up @@ -115,6 +193,10 @@ public void serialize(SharedLinkViewDetails value, JsonGenerator g, boolean coll
g.writeFieldName("shared_link_owner");
StoneSerializers.nullableStruct(UserLogInfo.Serializer.INSTANCE).serialize(value.sharedLinkOwner, g);
}
if (value.subdomain != null) {
g.writeFieldName("subdomain");
StoneSerializers.nullable(StoneSerializers.string()).serialize(value.subdomain, g);
}
if (!collapse) {
g.writeEndObject();
}
Expand All @@ -130,17 +212,21 @@ public SharedLinkViewDetails deserialize(JsonParser p, boolean collapsed) throws
}
if (tag == null) {
UserLogInfo f_sharedLinkOwner = null;
String f_subdomain = null;
while (p.getCurrentToken() == JsonToken.FIELD_NAME) {
String field = p.getCurrentName();
p.nextToken();
if ("shared_link_owner".equals(field)) {
f_sharedLinkOwner = StoneSerializers.nullableStruct(UserLogInfo.Serializer.INSTANCE).deserialize(p);
}
else if ("subdomain".equals(field)) {
f_subdomain = StoneSerializers.nullable(StoneSerializers.string()).deserialize(p);
}
else {
skipValue(p);
}
}
value = new SharedLinkViewDetails(f_sharedLinkOwner);
value = new SharedLinkViewDetails(f_sharedLinkOwner, f_subdomain);
}
else {
throw new JsonParseException(p, "No subtype found that matches tag: \"" + tag + "\"");
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/stone
Submodule stone updated 1 files
+3 −0 team_log.stone
Loading