static ImmutableList<ServiceElement> toElements(ImmutableList<Service> services) { ImmutableList.Builder<ServiceElement> elements = new ImmutableList.Builder<>(); for (Service service : services) { elements.add(ServiceElement.builder(service.location) .documentation(service.documentation) .name(service.name) .rpcs(Rpc.toElements(service.rpcs)) .options(service.options.toElements()) .build()); } return elements.build(); } }
static ImmutableList<FieldElement> toElements(ImmutableList<Field> fields) { ImmutableList.Builder<FieldElement> elements = new ImmutableList.Builder<>(); for (Field field : fields) { elements.add(FieldElement.builder(field.location) .label(field.label) .name(field.name) .documentation(field.documentation) .tag(field.tag) .defaultValue(field.defaultValue) .options(field.options.toElements()) .type(field.elementType) .build()); } return elements.build(); }
static ImmutableList<RpcElement> toElements(ImmutableList<Rpc> rpcs) { ImmutableList.Builder<RpcElement> elements = new ImmutableList.Builder<>(); for (Rpc rpc : rpcs) { elements.add(RpcElement.builder(rpc.location) .documentation(rpc.documentation) .name(rpc.name) .requestType(rpc.requestTypeElement) .responseType(rpc.responseTypeElement) .requestStreaming(rpc.requestStreaming) .responseStreaming(rpc.responseStreaming) .options(rpc.options.toElements()) .build()); } return elements.build(); } }
EnumConstantElement toElement() { return EnumConstantElement.builder(location) .documentation(documentation) .name(name) .tag(tag) .options(options.toElements()) .build(); }
EnumElement toElement() { return EnumElement.builder(location) .name(name) .documentation(documentation) .constants(EnumConstant.toElements(constants)) .options(options.toElements()) .build(); } }
ProtoFileElement toElement() { return ProtoFileElement.builder(location) .imports(imports) .publicImports(publicImports) .packageName(packageName) .types(Type.toElements(types)) .services(Service.toElements(services)) .extendDeclarations(Extend.toElements(extendList)) .options(options.toElements()) .syntax(syntax) .build(); }
MessageElement toElement() { return MessageElement.builder(location) .documentation(documentation) .name(name) .options(options.toElements()) .fields(Field.toElements(declaredFields)) .nestedTypes(Type.toElements(nestedTypes)) .oneOfs(OneOf.toElements(oneOfs)) .extensions(Extensions.toElements(extensionsList)) .reserveds(Reserved.toElements(reserveds)) .build(); } }
static ImmutableList<ServiceElement> toElements(ImmutableList<Service> services) { ImmutableList.Builder<ServiceElement> elements = new ImmutableList.Builder<>(); for (Service service : services) { elements.add(ServiceElement.builder(service.location) .documentation(service.documentation) .name(service.name) .rpcs(Rpc.toElements(service.rpcs)) .options(service.options.toElements()) .build()); } return elements.build(); } }
static ImmutableList<ServiceElement> toElements(ImmutableList<Service> services) { ImmutableList.Builder<ServiceElement> elements = new ImmutableList.Builder<>(); for (Service service : services) { elements.add(ServiceElement.builder(service.location) .documentation(service.documentation) .name(service.name) .rpcs(Rpc.toElements(service.rpcs)) .options(service.options.toElements()) .build()); } return elements.build(); } }
static ImmutableList<FieldElement> toElements(ImmutableList<Field> fields) { ImmutableList.Builder<FieldElement> elements = new ImmutableList.Builder<>(); for (Field field : fields) { elements.add(FieldElement.builder(field.location) .label(field.label) .name(field.name) .documentation(field.documentation) .tag(field.tag) .defaultValue(field.defaultValue) .options(field.options.toElements()) .type(field.elementType) .build()); } return elements.build(); }
static ImmutableList<RpcElement> toElements(ImmutableList<Rpc> rpcs) { ImmutableList.Builder<RpcElement> elements = new ImmutableList.Builder<>(); for (Rpc rpc : rpcs) { elements.add(RpcElement.builder(rpc.location) .documentation(rpc.documentation) .name(rpc.name) .requestType(rpc.requestTypeElement) .responseType(rpc.responseTypeElement) .requestStreaming(rpc.requestStreaming) .responseStreaming(rpc.responseStreaming) .options(rpc.options.toElements()) .build()); } return elements.build(); } }
static ImmutableList<FieldElement> toElements(ImmutableList<Field> fields) { ImmutableList.Builder<FieldElement> elements = new ImmutableList.Builder<>(); for (Field field : fields) { elements.add(FieldElement.builder(field.location) .label(field.label) .name(field.name) .documentation(field.documentation) .tag(field.tag) .defaultValue(field.defaultValue) .options(field.options.toElements()) .type(field.elementType) .build()); } return elements.build(); }
EnumConstantElement toElement() { return EnumConstantElement.builder(location) .documentation(documentation) .name(name) .tag(tag) .options(options.toElements()) .build(); }
EnumConstantElement toElement() { return EnumConstantElement.builder(location) .documentation(documentation) .name(name) .tag(tag) .options(options.toElements()) .build(); }
EnumElement toElement() { return EnumElement.builder(location) .name(name) .documentation(documentation) .constants(EnumConstant.toElements(constants)) .options(options.toElements()) .build(); } }
EnumElement toElement() { return EnumElement.builder(location) .name(name) .documentation(documentation) .constants(EnumConstant.toElements(constants)) .options(options.toElements()) .build(); } }
ProtoFileElement toElement() { return ProtoFileElement.builder(location) .imports(imports) .publicImports(publicImports) .packageName(packageName) .types(Type.toElements(types)) .services(Service.toElements(services)) .extendDeclarations(Extend.toElements(extendList)) .options(options.toElements()) .syntax(syntax) .build(); }
ProtoFileElement toElement() { return ProtoFileElement.builder(location) .imports(imports) .publicImports(publicImports) .packageName(packageName) .types(Type.toElements(types)) .services(Service.toElements(services)) .extendDeclarations(Extend.toElements(extendList)) .options(options.toElements()) .syntax(syntax) .build(); }
MessageElement toElement() { return MessageElement.builder(location) .documentation(documentation) .name(name) .options(options.toElements()) .fields(Field.toElements(declaredFields)) .nestedTypes(Type.toElements(nestedTypes)) .oneOfs(OneOf.toElements(oneOfs)) .extensions(Extensions.toElements(extensionsList)) .reserveds(Reserved.toElements(reserveds)) .build(); } }
MessageElement toElement() { return MessageElement.builder(location) .documentation(documentation) .name(name) .options(options.toElements()) .fields(Field.toElements(declaredFields)) .nestedTypes(Type.toElements(nestedTypes)) .oneOfs(OneOf.toElements(oneOfs)) .extensions(Extensions.toElements(extensionsList)) .reserveds(Reserved.toElements(reserveds)) .build(); } }