gpt4 book ai didi

com.sitewhere.rest.model.area.request.ZoneCreateRequest类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 11:01:58 27 4
gpt4 key购买 nike

本文整理了Java中com.sitewhere.rest.model.area.request.ZoneCreateRequest类的一些代码示例,展示了ZoneCreateRequest类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneCreateRequest类的具体详情如下:
包路径:com.sitewhere.rest.model.area.request.ZoneCreateRequest
类名称:ZoneCreateRequest

ZoneCreateRequest介绍

[英]Provides parameters needed to create a new zone.
[中]提供创建新分区所需的参数。

代码示例

代码示例来源:origin: com.sitewhere/sitewhere-java-model

public Builder(String token, String name, IArea area) {
  request.setToken(token);
  request.setName(name);
  request.setAreaToken(area.getToken());
}

代码示例来源:origin: com.sitewhere/sitewhere-java-model

public Builder withBorderColor(String borderColor) {
  request.setBorderColor(borderColor);
  return this;
}

代码示例来源:origin: com.sitewhere/sitewhere-java-model

public Builder withFillColor(String fillColor) {
  request.setFillColor(fillColor);
  return this;
}

代码示例来源:origin: com.sitewhere/sitewhere-java-model

public Builder metadata(String name, String value) {
  if (request.getMetadata() == null) {
  request.setMetadata(new HashMap<String, String>());
  }
  request.getMetadata().put(name, value);
  return this;
}

代码示例来源:origin: sitewhere/sitewhere

/**
 * Convert zone create request from GRPC to API.
 * 
 * @param grpc
 * @return
 * @throws SiteWhereException
 */
public static ZoneCreateRequest asApiZoneCreateRequest(GZoneCreateRequest grpc) throws SiteWhereException {
ZoneCreateRequest api = new ZoneCreateRequest();
api.setToken(grpc.hasToken() ? grpc.getToken().getValue() : null);
api.setAreaToken(grpc.hasAreaToken() ? grpc.getAreaToken().getValue() : null);
api.setName(grpc.hasName() ? grpc.getName().getValue() : null);
api.setBounds(CommonModelConverter.asApiLocations(grpc.getBoundsList()));
api.setFillColor(grpc.hasFillColor() ? grpc.getFillColor().getValue() : null);
api.setBorderColor(grpc.hasBorderColor() ? grpc.getBorderColor().getValue() : null);
api.setOpacity(grpc.hasOpacity() ? grpc.getOpacity().getValue() : null);
api.setMetadata(grpc.getMetadataMap());
return api;
}

代码示例来源:origin: com.sitewhere/sitewhere-java-model

public Builder withOpacity(double opacity) {
  request.setOpacity(opacity);
  return this;
}

代码示例来源:origin: com.sitewhere/sitewhere-java-model

public Builder coord(double latitude, double longitude) {
  request.getBounds().add(new Location(latitude, longitude));
  return this;
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com